Func _WinWaitActivate($title, $text, $timeout = 0)
WinWait($title, $text, $timeout)
If Not WinActive($title, $text) Then WinActivate($title, $text)
WinWaitActive($title, $text, $timeout)
EndFunc ;==>_WinWaitActivate
;~ _WinWaitActivate("计算器", "")
ConsoleWrite(1&',')
ControlClick ( "计算器",'',133, 'left' , 1 , 19,14)
ConsoleWrite(2&',')
;~ _WinWaitActivate("计算器", "")
ConsoleWrite(3&',')
ControlClick ( "计算器",'',91, 'left' , 1 , 17,11)
ConsoleWrite(4&',')
;~ _WinWaitActivate("计算器", "")
ConsoleWrite(5&',')
ControlClick ( "计算器",'',126, 'left' , 1 , 12,16)
ConsoleWrite(6&',')
;~ _WinWaitActivate("计算器", "")
ConsoleWrite(7&',')
ControlClick ( "计算器",'',112, 'left' , 1 , 20,22)
ConsoleWrite(8&',')
up 我刚才测试了一下,可以在不激活状态发送控件点击命令,上面的代码在计算器最小化也可以实现