fluffman Posted January 30, 2011 Share Posted January 30, 2011 Apologies for my first post being a question but hey I can't help others yet anyways I need to put in the middle of my script a little pause function that stays paused until I have completed an action and then will probably have to click continue to continue. I only know how to use the sleep function so far. I've been reading a lot in the help file and know how helpful it is however I have not found help in it for this. I'm sure there is something for this in there but it probably needs to be pieced together from a few functions which I'm not clever enough to do. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted January 30, 2011 Share Posted January 30, 2011 (edited) Have you heard of a while loop? They look like this: While (condition) do something Wend The 'do something' will keep happening as long as the condition is true. For the condition you could check a variable, like 'while $x = 1' While $x=1 do functions Wend This specific statement means that it will do the functions between while $x =1 and wend, if x is equal to one. Remembering that a dollar sign symbolizes a variable/pronumeral... But you would like in your condition for it to be while the click is not pressed. So look at the _ispressed function or similar, and don't forget to prefix it with 'not' so that it loops/waits while the button is not pressed, not while it is. Edited January 30, 2011 by hyperzap ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
fluffman Posted January 30, 2011 Author Share Posted January 30, 2011 Thanks hyperzap this really gets me somewhere! I had not head much about loops and not at all about the while loop. I will of course have to go to the help file and read about everything you mentioned though. But I have a much better idea of where I can go from here now. Ty. Link to comment Share on other sites More sharing options...
Skitty Posted January 30, 2011 Share Posted January 30, 2011 Thanks hyperzap this really gets me somewhere! I had not head much about loops and not at all about the while loop.I will of course have to go to the help file and read about everything you mentioned though.But I have a much better idea of where I can go from here now. Ty.Try Msgbox(0,"Operation halted","Continue?") Link to comment Share on other sites More sharing options...
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