按键精灵如何实现每4秒按一次1键每30秒按一次2键。无限循环~
答案:3 悬赏:50 手机版
解决时间 2021-04-02 12:09
- 提问者网友:骑士
- 2021-04-01 17:20
按键精灵如何实现每4秒按一次1键每30秒按一次2键。无限循环~
最佳答案
- 五星知识达人网友:封刀令
- 2021-04-01 18:05
Dim tim1,tim2
tim1=now
tim2=now
While true
If DateDiff("s",tim1,now) >= 4 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
Wend
tim1=now
tim2=now
While true
If DateDiff("s",tim1,now) >= 4 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
Wend
全部回答
- 1楼网友:孤独入客枕
- 2021-04-01 20:08
i = 0
k = 0
While true
i = i + 1
k = k + 1
If i = 4 Then
KeyUp "1", 1
i = 0
End If
If k = 30 Then
KeyUp "2", 1
k = 0
End If
Delay 1000
wend
k = 0
While true
i = i + 1
k = k + 1
If i = 4 Then
KeyUp "1", 1
i = 0
End If
If k = 30 Then
KeyUp "2", 1
k = 0
End If
Delay 1000
wend
- 2楼网友:执傲
- 2021-04-01 19:36
BeginThread a
BeginThread b
Sub a
Rem q
KeyPress "1", 1
Delay 4000
Goto q
End Sub
Sub b
Rem q
KeyPress "2", 1
Delay 30000
Goto q
End Sub
BeginThread b
Sub a
Rem q
KeyPress "1", 1
Delay 4000
Goto q
End Sub
Sub b
Rem q
KeyPress "2", 1
Delay 30000
Goto q
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯