要能在几个不同窗口间不断循环转换。
找个按键精灵高手教我编一个小程序。
- 提问者网友:剪短发丝
- 2021-04-28 01:52
- 二级知识专家网友:承载所有颓废
- 2021-04-28 02:26
哪,把下面的脚本复制到您的按键里就行了,因为您没有说要切换几个并且切换多少次,所以只好一直用弹窗然后让您输入要几个窗口多少时间切换几次了。如果可以追加问题说明一下这些问题,脚本可以相当简化的。呵呵~~
一点技术含量都没有的脚本,不过虽然麻烦点应该可以满足您的需要了。记着弹出要让您切换窗口的提示后点击了确定要在二秒钟之内切换到。因为要得到窗口的句柄。
ck=InputBox("请输入您要切换几个窗口,并点击确定")
if ck=0
ck=InputBox("请输入您要切换几个窗口(必填项)并点击确定")
endif
pl = InputBox("请输入窗口切换的时间快慢,输入1即代表1秒钟")
if pl=0
pl=InputBox("请输入窗口切换的时间快慢(必填项),输入1即代表1秒钟")
endif
pl=pl*1000
cs= InputBox("请输入这几个窗口要切换多少次,并点击确定")
if cs=0
cs=InputBox("请输入这几个窗口要切换多少次(必填项),并点击确定")
endif
If ck=6
Rem 6
MessageBox "请点击确定后在二秒内切换到第一个要切换的窗口"
Delay 2000
Plugin a= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第二个要切换的窗口"
Delay 2000
Plugin b= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第三个要切换的窗口"
Delay 2000
Plugin c= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第四个要切换的窗口"
Delay 2000
Plugin d= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第五个要切换的窗口"
Delay 2000
Plugin e= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第六个要切换的窗口"
Delay 2000
Plugin f= Window.MousePoint()
For cs
Plugin Window.Active(a)
Delay pl
Plugin Window.Active(b)
Delay pl
Plugin Window.Active(c)
Delay pl
Plugin Window.Active(d)
Delay pl
Plugin Window.Active(e)
Delay pl
Plugin Window.Active(f)
Delay pl
EndFor
Goto 程序结束
EndIf
If ck=5
Rem 5
MessageBox "请点击确定后在二秒内切换到第一个要切换的窗口"
Delay 2000
Plugin a= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第二个要切换的窗口"
Delay 2000
Plugin b= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第三个要切换的窗口"
Delay 2000
Plugin c= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第四个要切换的窗口"
Delay 2000
Plugin d= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第五个要切换的窗口"
Delay 2000
Plugin e= Window.MousePoint()
For cs
Plugin Window.Active(a)
Delay pl
Plugin Window.Active(b)
Delay pl
Plugin Window.Active(c)
Delay pl
Plugin Window.Active(d)
Delay pl
Plugin Window.Active(e)
Delay pl
EndFor
Goto 程序结束
EndIf
If ck=4
Rem 4
MessageBox "请点击确定后在二秒内切换到第一个要切换的窗口"
Delay 2000
Plugin a= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第二个要切换的窗口"
Delay 2000
Plugin b= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第三个要切换的窗口"
Delay 2000
Plugin c= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第四个要切换的窗口"
Delay 2000
Plugin d= Window.MousePoint()
For cs
Plugin Window.Active(a)
Delay pl
Plugin Window.Active(b)
Delay pl
Plugin Window.Active(c)
Delay pl
Plugin Window.Active(d)
Delay pl
EndFor
Goto 程序结束
EndIf
If ck=3
Rem 3
MessageBox "请点击确定后在二秒内切换到第一个要切换的窗口"
Delay 2000
Plugin a= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第二个要切换的窗口"
Delay 2000
Plugin b= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第三个要切换的窗口"
Delay 2000
Plugin c= Window.MousePoint()
For cs
Plugin Window.Active(a)
Delay pl
Plugin Window.Active(b)
Delay pl
Plugin Window.Active(c)
Delay pl
EndFor
Goto 程序结束
EndIf
If ck=2
Rem 2
MessageBox "请点击确定后在二秒内切换到第一个要切换的窗口"
Delay 2000
Plugin a= Window.MousePoint()
MessageBox "请点击确定后在二秒内切换到第二个要切换的窗口"
Delay 2000
Plugin b= Window.MousePoint()
For cs
Plugin Window.Active(a)
Delay pl
Plugin Window.Active(b)
Delay pl
EndFor
Goto 程序结束
EndIf
Rem 程序结束
- 1楼网友:woshuo
- 2021-04-28 03:43
- 2楼网友:单身小柠`猫♡
- 2021-04-28 03:37
= =! 要善用插件
送你三条命令
Plugin hwnd=Window.Foreground()
获得当前窗口的窗口句柄
.
Plugin Window.Active(hwnd)
把窗口句柄为hwnd的窗口 激活!
.
Plugin Window.Max(hwnd)
把窗口句柄为hwnd的窗口 最大化!