当我运行脚本时,我希望逐步执行发送事件。以下是我正在运行的代码:
注意:我曾尝试使用Set Key Delay和SetControlDelay但不起作用:(
#SingleInstance force
#Persistent
Run,Desk.cpl
SetTimer, Check, 1000
return
Check:
IfWinActive, ahk_class CabinetWClass
SetKeyDelay, 0
SendEvent {Click 678, 368}
IfWinActive, ahk_class #32770
SendEvent {Click 212, 67}
IfWinActive, ahk_class #32770
SetControlDelay, 20
SendEvent {Click 88, 362}
IfWinNotExist, ahk_class CabinetWClass
{
ExitApp
return
}
答案 0 :(得分:0)
您要找的是SetMouseDelay。增加数字并测试最适合你的时间。
#SingleInstance force
#Persistent
Run,Desk.cpl
SetTimer, Check, 1000
return
Check:
IfWinActive, ahk_class CabinetWClass
SetMouseDelay, 0
SendEvent {Click 678, 368}
IfWinActive, ahk_class #32770
SendEvent {Click 212, 67}
IfWinActive, ahk_class #32770
SetMouseDelay, 20
SendEvent {Click 88, 362}
IfWinNotExist, ahk_class CabinetWClass
{
ExitApp
return
}