mond1106 Posted October 26, 2016 Posted October 26, 2016 Hi, Im new to autoit I trying to delay the send of enter of the program im making but it doesnt work. here is my code. #include<ImageSearch2015.au3> HotKeySet("{-}", "TogglePause") HotKeySet("{ESC}", "Terminate") Global $NoWork $TransTimer = 0 $x1 = 0 $y1 = 0 While 1 Local $hWnd = WinWait("[Pictures]", "", 5) WinActivate($hWnd) $picture = "poopies.png" $result = _ImageSearch($picture,1,$x1,$y1,0,0) ConsoleWrite($result) If $result = 1 Then MouseClick("left",$x1,$y1,1,1) sleep (10000) Send("ENTER") Send("ENTER") Send("ENTER") EndIf WEnd Func TogglePause() $NoWork = Not $NoWork While $NoWork sleep(100) ToolTip('Paused',491,149) WEnd ToolTip("") EndFunc Func Terminate() Sleep(100) ToolTip('Stopped',491,149) Sleep(10000) Exit 0 EndFunc Thank you.
r3dbullo88 Posted October 26, 2016 Posted October 26, 2016 If you type send ("ENTER") AutoIT will assume "ENTER" as a string of characters. If you need to simulate the Enter button, you have to write Send ("{ENTER}"). Source: https://www.autoitscript.com/autoit3/docs/functions/Send.htm
mond1106 Posted October 26, 2016 Author Posted October 26, 2016 Just now, r3dbullo88 said: If you type send ("ENTER") AutoIT will assume "ENTER" as a string of characters. If you need to simulate the Enter button, you have to write Send ("{ENTER}"). Source: https://www.autoitscript.com/autoit3/docs/functions/Send.htm I will try that thank you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now