之前为了抓取兴趣部落里的数据,研究了下QQ自动登录. 当时搜索了一番,发现大部分方法都已经失效了,于是准备自己开搞. 第一个想到的就是参考网上已有方案的做法,梳理登陆js的实现,通过其他语言重写.考虑到js可能会更新,放弃了此方案. 第二个想到的是能不能直接调用QQ自己的js方法,模拟进行提交呢.搜索一番后发现神器 ---- "phantomjs". PhantomJS is a headless WebKit scriptable with a JavaScript API. It
C#获取窗口,模拟按键操作,实现计算器模拟操作.首先引用. using System.Runtime.InteropServices; 使用DllImport引入两个函数: // Get a handle to an application window. [DllImport("USER32.DLL", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindow(string lpClassName, stri
一直在想,使用模拟按键,也可以实现一些AI操作,具体还没做过,这里使用user32.dll在unity里写的一个简单demo using UnityEngine; using System.Collections; using System.Runtime.InteropServices; public class GetKeyCodeKey : MonoBehaviour { [DllImport("user32.dll", EntryPoint = "keybd_even