按键精灵9 怎样相同的一个脚本 2个或者多个程序运行

2025-06-22 03:05:47
推荐回答(2个)
回答1:

Hwnd = Plugin.Window.MousePoint()
MessageBox "1"
Hwnd1 = Plugin.Window.MousePoint()
MessageBox "2"
Hwnd2 = Plugin.Window.MousePoint()
Rem a
For 30
Call Plugin.Bkgnd.KeyPress(Hwnd, 9)//table
Call Plugin.Bkgnd.KeyPress(Hwnd1, 9)
Call Plugin.Bkgnd.KeyPress(Hwnd2, 9)
Call Plugin.Bkgnd.KeyPress(Hwnd, 49)//1
Call Plugin.Bkgnd.KeyPress(Hwnd1, 49)
Call Plugin.Bkgnd.KeyPress(Hwnd2, 49)
Call Plugin.Bkgnd.KeyPress(Hwnd, 50)//2
Call Plugin.Bkgnd.KeyPress(Hwnd1, 50)
Call Plugin.Bkgnd.KeyPress(Hwnd2, 50)
Call Plugin.Bkgnd.KeyPress(Hwnd, 51)//3
Call Plugin.Bkgnd.KeyPress(Hwnd1, 51)
Call Plugin.Bkgnd.KeyPress(Hwnd2, 51)
Call Plugin.Bkgnd.KeyPress(Hwnd, 52)//4
Call Plugin.Bkgnd.KeyPress(Hwnd1, 52)
Call Plugin.Bkgnd.KeyPress(Hwnd2, 52)
Next

大概就这意思。。。

回答2:

多开游戏,分别获取游戏窗口句柄,多线程向句柄发送后台指令即可。