Ultratech Posted March 3, 2007 Posted March 3, 2007 (edited) Trying to do something simple, exit a function. Nothing is working. I want to exit the function and resume the While 1. #include <GuiConstants.au3> HotKeySet("z", "FStart") HotKeySet("x", "FReturn") Local $pause While 1 Sleep(100) WEnd Func FStart() Do Send("Running") Sleep(3000) Until $pause = Not $pause EndFunc Func FReturn() $pause = Not $pause Send("Not Running") EndFunc I want it to keep typing "Running" until "x" is pressed. It types "Not Running", but "Running" is still being typed. What else can I try. Nevermind I finally figured it out after an hour (see topic icon) Edited March 3, 2007 by Ultratech
Kourath Posted March 3, 2007 Posted March 3, 2007 (edited) try this: $pause = 0 Func FStart() $pause = 1 EndFunc Func FReturn() $pause = 0 Send("Not Running") EndFunc HotKeySet("z", "FStart") HotKeySet("x", "FReturn") While 1 Sleep(100) While $pause = 1 Send("Running") Sleep(3000) WEnd WEnd edit: oops, didn't see you fixed it yourself. oh well. Edited March 3, 2007 by Kourath
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