AHK ControlClick 为啥出错?
https://www.autohotkey.com/docs/v2/lib/ControlClick.htm#Reliability
Run "C:\\new_tdx\\TdxW.exe"
if WinWait("通达信金融终端V7.48", , 6){ ; WinMinimize ; Use the window found by WinWait.;MsgBox "WinWait not timed out."ControlChooseIndex(2,"SysTabControl321")Sleep 500SetControlDelay -1ControlClick "Button1", "通达信金融终端V7.48",,,, "NA"Sleep 2500If WinExist("通达信信息") {WinClose ;} }
else{MsgBox "WinWait timed out."
}
您可以将NA指定为第六个参数,以等待鼠标按钮抬起。 我发现,在Control, Check, ,Button1之前触发ControlClick时,单击不起作用,但是在末尾添加了NA,以某种方式神奇地修复了它。我猜想点击是模拟的,但尚未提升。
Controlclick x160 y60,A,Left,1, NA
像这样的手动选项应该起作用,至少在我看来它是起作用的。
Left = your mouse button pressed
1 = number of clicks
A = Active Window