按键精灵 无限循环2秒按1 无限循环30秒按一次2

2024-11-08 18:49:30
推荐回答(1个)
回答(1):

Dim tim1,tim2
tim1=now
tim2=now
Rem XX
KeyPress "1", 1
Delay 200
KeyPress "2", 1
Delay 200
If DateDiff("s",tim1,now) >= 2 Then
tim1=now
KeyPress "1", 1
Delay 200
End if
If DateDiff("s",tim2,now) >= 30 Then
tim2=now
KeyPress "2", 1
Delay 200
End if
goto xx