按键精灵如何实现每4秒按一次1键每30秒按一次2键。无限循环~
3个回答
展开全部
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
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询