按键精灵7如何让一个脚本2个程序同时运行?
双线程后台,源代码复制进去运行吧。还有就是最好去下载最新的按键精灵9.0.官网去下个吧
MessageBox "把鼠标放到第一个窗口"
Delay 3000
h1=Plugin.Window.MousePoint()
MessageBox "把鼠标放到第二个窗口"
Delay 3000
h2=Plugin.Window.MousePoint()
Delay 1000
BeginThread A1
BeginThread A2
Sub a1
Call Plugin.Bkgnd.Keydown(h1, 49)
Delay 50
Call Plugin.Bkgnd.Keyup(h1, 49)
Delay 3500
Call Plugin.Bkgnd.KeyDown(h1, 50)
Delay 50
Call Plugin.Bkgnd.KeyUp(h1, 50)
Delay 3500
Call Plugin.Bkgnd.KeyDown(h1, 51)
Delay 50
Call Plugin.Bkgnd.KeyUp(h1, 51)
Delay 3500
Call Plugin.Bkgnd.KeyDown(h1, 52)
Delay 50
Call Plugin.Bkgnd.KeyUp(h1, 52)
Call Plugin.Bkgnd.KeyDown(h1, 18)
Call Plugin.Bkgnd.KeyPress(h1, 9)
Delay 50
Call Plugin.Bkgnd.KeyUp(h1, 9)
Call Plugin.Bkgnd.Keyup(h1, 18)
Delay 50
End Sub
Sub a2
Call Plugin.Bkgnd.Keydown(h2, 49)
Delay 50
Call Plugin.Bkgnd.Keyup(h2, 49)
Delay 3500
Call Plugin.Bkgnd.KeyDown(h2, 50)
Delay 50
Call Plugin.Bkgnd.KeyUp(h2, 50)
Delay 3500
Call Plugin.Bkgnd.KeyDown(h2, 51)
Delay 50
Call Plugin.Bkgnd.KeyUp(h2, 51)
Delay 3500
Call Plugin.Bkgnd.KeyDown(h2, 52)
Delay 50
Call Plugin.Bkgnd.KeyUp(h2, 52)
Call Plugin.Bkgnd.KeyDown(h2, 18)
Call Plugin.Bkgnd.KeyPress(h2, 9)
Delay 50
Call Plugin.Bkgnd.KeyUp(h2, 9)
Call Plugin.Bkgnd.Keyup(h2, 18)
Delay 50
End Sub