求一个按键精灵简单脚本,4分钟按一次F4 50秒按一次F5直到我中止按键精灵为止。。 15
4个回答
展开全部
//kssj1、2是开始时间,也是下次延时的开始;sj1和2是间隔时间,单位是秒;
kssj1 = now
kssj2 = now
Randomize
sj1 = 4*60
Randomize
sj2 = 50
Rem 开始
If DateDiff("s",kssj1,Now)>sj1
//调试用SayString " sj1="&sj1
KeyPress "F4", 1
kssj1=now
End If
If DateDiff("s",kssj2,Now)>sj2
//调试用SayString " sj2="&sj2
KeyPress "F5", 1
kssj2=now
End If
Delay 100
Goto 开始
//参考http://zhidao.baidu.com/question/375667062.html?fr=im100400
kssj1 = now
kssj2 = now
Randomize
sj1 = 4*60
Randomize
sj2 = 50
Rem 开始
If DateDiff("s",kssj1,Now)>sj1
//调试用SayString " sj1="&sj1
KeyPress "F4", 1
kssj1=now
End If
If DateDiff("s",kssj2,Now)>sj2
//调试用SayString " sj2="&sj2
KeyPress "F5", 1
kssj2=now
End If
Delay 100
Goto 开始
//参考http://zhidao.baidu.com/question/375667062.html?fr=im100400
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
BeginThread key1
BeginThread key2
Function key1
While 1
KeyPress "F4", 1
Delay 240000
Wend
End Function
Function key2
While 2
KeyPress "F5", 1
Delay 50000
Wend
End Function
BeginThread key2
Function key1
While 1
KeyPress "F4", 1
Delay 240000
Wend
End Function
Function key2
While 2
KeyPress "F5", 1
Delay 50000
Wend
End Function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
楼下的太麻烦,这个简单
KeyPress 115, 1
KeyPress 116, 1
For 5
Delay 10000
Next
KeyPress 116, 1
For 19
10000
Next
KeyPress 115, 1
KeyPress 116, 1
For 5
Delay 10000
Next
KeyPress 116, 1
For 19
10000
Next
追问
怎么提示语句有错误。。
追答
抱歉,忘了加关键字
KeyPress 115, 1
KeyPress 116, 1
For 5
Delay 10000
Next
KeyPress 116, 1
For 19
Delay 10000
Next
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询