Do
For 1000 * 60 * 90
Delay 1000
Next
KeyPress "F9", 1
Delay 1000
KeyPress "F10", 1
Loop
KeyPress "F7", 1
Rem a
s = Plugin.sys.GetTime()
Rem b
Delay 100
s1 = Plugin.sys.gettime()
h = s1 - s
If h >= 10000 Then
Call 按键
Goto a
Else
Goto b
End If
Sub 按键
KeyPress "F7", 1
End Sub
这个是比较高科技的方式,通过时间判断
Delay 3000
Hwnd = Plugin.Window.MousePoint()
Rem 开始
Call Plugin.Bkgnd.KeyPress(Hwnd, 49)
Delay 1000
Goto 开始
把程式码复制到按键精灵,在启动指令码3秒钟内把滑鼠移动到游戏视窗中,指令码可以后台按键。感觉好记得给我分。。。。。
Rem 回圈
KeyPress "A", 1
Delay 1000
KeyPress "D", 1
Delay 300000
Goto 回圈
我不是高手但这样就可以完成你的要求了
t1 = now
turn = 1
Rem XX
For 4
KeyPress "1", 1
Delay 500
Next
KeyPress "Tab", 1
t2 = now
JG = DateDiff("n", t1, t2)
If JG >= 90 Then
Select Case turn
Case 1
KeyPress "F1", 1
turn = turn + 1
t1 = now
Case 2
KeyPress "F2", 1
turn = turn + 1
t1 = now
Case 3
KeyPress "F3", 1
turn = turn + 1
t1 = now
Case 4
KeyPress "F4", 1
turn = 1
t1 = now
End Select
End If
Goto XX
用按键精灵的录制功能啊,你手动每20秒按一下F1,录一次之后,里面有设定回圈的选项,你设定下就行了,然后储存退出,F10开始,F12停止
按F1开始 再按F1停止 这个不能实现吧
开始建与结束键理论上 不可以是同一个键
最好设定成不同的按键,可以F1 开始 F2或是别的键结束
前台指令码:
Rem 回圈
KeyPress "F1", 1
Delay 100 ' 一秒钟按10下F1
Goto 回圈 '自动回圈 直到按停止键结束
后台指令码:
Dim hwnd
hwnd = Plugin.Window.MousePoint()
Delay 100
Rem 回圈
Call Plugin.Bkgnd.KeyPress(Hwnd, 112)
Delay 100
Goto 回圈 '同前台原理相同
?
Delay 2000 ------------【运气指令码后,2秒内在需要的视窗单击,
Dim hwnd
hwnd=Plugin.Window.MousePoint()
for 10000 -----------[回圈10000次]
Call Plugin.Bkgnd.KeyPress(hwnd, 32)
Delay 60000
endfor
也许 do loop 更适合 ,不会用
dim aj
Rem 1
Delay 100
GetLastKey aj
F9
ifaj=120
复制
KeyDown 17,1
Delay 100
KeyPress 67,1
KeyUp 17,1
EndIf
If aj=121
贴上
KeyDown 17,1
Delay 100
KeyPress 86,1
KeyUp 17,1
EndIf
Goto 1