IcantCodeHelp Posted April 9, 2019 Posted April 9, 2019 can someone fix my script and add hot key as esc and fix the loop the problem is it wont stop looping While 1 HotKeySet("{ESC}", "_Exit") WinActivate("Untitled") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") WEnd
IcantCodeHelp Posted April 9, 2019 Author Posted April 9, 2019 can someone fix my script and add hot key as esc and fix the loop the problem is it wont stop looping While 1 HotKeySet("{ESC}", "_Exit") WinActivate("Untitled") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") WEnd
IcantCodeHelp Posted April 9, 2019 Author Posted April 9, 2019 can someone fix my script and add hot key as esc and fix the loop the problem is it wont stop looping While 1 HotKeySet("{ESC}", "_Exit") WinActivate("Untitled") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") WEnd
jdelaney Posted April 9, 2019 Posted April 9, 2019 HotKeySet("{ESC}", "_Exit") While 1 ; add in your stuff WEnd Func _Exit () Exit EndFunc IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
AlmarM Posted April 9, 2019 Posted April 9, 2019 On 4/9/2019 at 12:22 AM, IcantCodeHelp said: can someone fix my script and add hot key as esc and fix the loop the problem is it wont stop looping While 1 HotKeySet("{ESC}", "_Exit") WinActivate("Untitled") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") WEnd Expand Oh boy this is an old post. Anyway, you should probably move that HotKeySet outside of the while loop. I assume you've a _Exit function defined somewhere? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
Developers Jos Posted April 9, 2019 Developers Posted April 9, 2019 (edited) Could you please STOP posting your problem at multiple places where it even doesn't belong at all! I assume you are in a rush or something be we are not and hate to have to clean up for your impatience. Jos Edited April 9, 2019 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
IcantCodeHelp Posted April 9, 2019 Author Posted April 9, 2019 sorry i was in a rush in a wouldnt stop going @Jos
IcantCodeHelp Posted April 9, 2019 Author Posted April 9, 2019 On 4/9/2019 at 7:21 AM, Jos said: Could you please STOP posting your problem at multiple places where it even doesn't belong at all! I assume you are in a rush or something be we are not and hate to have to clean up for your impatience. Jos Expand On 4/9/2019 at 2:28 AM, jdelaney said: HotKeySet("{ESC}", "_Exit") While 1 ; add in your stuff WEnd Func _Exit () Exit EndFunc Expand it didnt work is there something i missed?
Developers Jos Posted April 9, 2019 Developers Posted April 9, 2019 Why are you quoting me? On 4/9/2019 at 9:13 PM, IcantCodeHelp said: it didnt work is there something i missed? Expand What does that mean? you run this code and Esc does stop it and it keeps running? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Earthshine Posted April 10, 2019 Posted April 10, 2019 It means he didn’t put his code inside the loop And just ran that piece of code My resources are limited. You must ask the right questions
IcantCodeHelp Posted April 10, 2019 Author Posted April 10, 2019 (edited) On 4/10/2019 at 12:24 AM, Earthshine said: It means he didn’t put his code inside the loop And just ran that piece of code Expand i did but once i clicked ESC it didnt stop @Jos Edited April 10, 2019 by IcantCodeHelp
jdelaney Posted April 10, 2019 Posted April 10, 2019 (edited) Works for me. Post your full script. Provide steps to reproduce. I can reproduce with something like this: HotKeySet("{ESC}", "_Exit") While 1 MsgBox(1,1,1) WEnd Func _Exit () Exit EndFunc The Exit still occurs, but not until the msgbox is closed. Edited April 10, 2019 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Developers Jos Posted April 10, 2019 Developers Posted April 10, 2019 On 4/10/2019 at 1:38 AM, IcantCodeHelp said: i did but once i clicked ESC it didnt stop @Jos Expand Clicked ESC? Or did you mean pushed? Which program are you running in the foreground that could snoop this key press? ... And as stated: post your none working code when you want help. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
IcantCodeHelp Posted April 10, 2019 Author Posted April 10, 2019 here's the script HotKeySet("{ESC}", "_Exit") While 1 WinActivate("Untitled") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") send("-work") send("{Enter}") send("-dep all") send("{Enter}") sleep("120000") WEnd Func _Exit() Exit EndFunc?
Developers Jos Posted April 10, 2019 Developers Posted April 10, 2019 (edited) ... and the answer to my other question is??? PS: The script works fine with Notepad providing it is a empty unchanged file. So provide sufficient info when you want help please. Edited April 10, 2019 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
IcantCodeHelp Posted April 10, 2019 Author Posted April 10, 2019 im not so good at this i just made the code in note pad than ran it
Developers Jos Posted April 10, 2019 Developers Posted April 10, 2019 Again: Your posted script works fine with notepad and stops when you press Esc. Open SciTE, which came with the AutoIt3 installer, Open the script it that. Start Notepad and press F5 (Run) in SciTE so the script starts. Then press Esc and you will see the script ends. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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