求一个网页游戏按键精灵后台脚本

2024-11-20 09:17:43
推荐回答(3个)
回答1:

楼上这样写无效的,浏览器有多个子窗口,必须获取到正确的子窗口输入命令才有效

//我只有遨游,只能写个范例给你
Hwnd = Plugin.Window.Find("Maxthon3Cls_MainFrm", 0)
HwndEx = Plugin.Window.FindEx(Hwnd, 0, "Maxthon3Cls_BrowserView", 0)
Hwnds = Plugin.Window.FindEx(HwndEX, 0, "Maxthon3Cls_WebViewHost", 0)

Do
Call Plugin.Bkgnd.KeyPress(Hwnds, 87)
Delay 1000
Loop

回答2:

Hwnd = Plugin.Window.Foreground()
Do
Call Plugin.Bkgnd.KeyPress(Hwnd, 87)
Delay 1000
Loop
应你要求,指定窗口无限循环一秒按一次W键

回答3:

Hwnd = Plugin.Window.Mousepoint()
Do
Call Plugin.Bkgnd.KeyPress(Hwnd, 87)
Delay 1000
Loop