求个按键精灵-后台分键循环脚本,要求1键每隔10秒按一次,2键每1分钟按一次,以此类推,无限循环。
3个回答
展开全部
Hwnd = Plugin.Window.GetKeyFocusWnd()
Rem A
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 50)
Delay 60000
Goto A
_______________________________________________________
上面那个错了....没有留意...下面那个六十秒漏了多少个1没有按阿...
改了一下,应该没有错了吧~
_______________________________________________________
Hwnd = Plugin.Window.GetKeyFocusWnd()
Rem A
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 50)
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Goto A
_______________________________________________________________
无聊的时候想到数值大的时候,上面那样太麻烦了,加个算术-
_______________________________________________________________
Hwnd = Plugin.Window.GetKeyFocusWnd()
Delay 10000
Rem A
B = 1
Rem D
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
B = B + 1
If B = 6 Then
Goto C
Else
Goto D
End If
Rem C
Call Plugin.Bkgnd.KeyDown(hwnd, 50)
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Goto A
___________________________________________________________
晕~~~确实...~~~
Rem A
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 50)
Delay 60000
Goto A
_______________________________________________________
上面那个错了....没有留意...下面那个六十秒漏了多少个1没有按阿...
改了一下,应该没有错了吧~
_______________________________________________________
Hwnd = Plugin.Window.GetKeyFocusWnd()
Rem A
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Call Plugin.Bkgnd.KeyDown(hwnd, 50)
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Goto A
_______________________________________________________________
无聊的时候想到数值大的时候,上面那样太麻烦了,加个算术-
_______________________________________________________________
Hwnd = Plugin.Window.GetKeyFocusWnd()
Delay 10000
Rem A
B = 1
Rem D
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
B = B + 1
If B = 6 Then
Goto C
Else
Goto D
End If
Rem C
Call Plugin.Bkgnd.KeyDown(hwnd, 50)
Call Plugin.Bkgnd.KeyDown(hwnd, 49)
Delay 10000
Goto A
___________________________________________________________
晕~~~确实...~~~
展开全部
何必呢..简单的算法
Hwnd = Plugin.Window.GetKeyFocusWnd()
While 1
For 6
Delay 10000
Call Plugin.Bkgnd.KeyPress(hwnd, 49)
Next
Call Plugin.Bkgnd.KeyPress(hwnd, 50)
Wend
Hwnd = Plugin.Window.GetKeyFocusWnd()
While 1
For 6
Delay 10000
Call Plugin.Bkgnd.KeyPress(hwnd, 49)
Next
Call Plugin.Bkgnd.KeyPress(hwnd, 50)
Wend
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-04-22
展开全部
2楼正解,只不过需要把60000改成50000 要不就变成70秒按一次2键了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询