Hunter Posted May 28, 2009 Share Posted May 28, 2009 Hello, I need help pausing my script I made a while ago. I need it to pause for 2 seconds. Can some one give me the Code. Oh yea and here is my Script. $answer = msgbox(1, "URC", "Ultimate Left Clicker Was Created By: Hunter Davis") $answer = msgbox(1, "URC", "F4 Starts the RC & F5 Exits the RC") HotKeySet("{F5}", "ExitProg") HotKeySet("{F4}", "StartProg") While 1 Sleep(100) Wend Func StartProg() while 1 MouseClick("left") Sleep(50) WEnd EndFunc Func ExitProg() Exit 0 EndFunc Thank You Hunter Davis. Link to comment Share on other sites More sharing options...
oMBRa Posted May 28, 2009 Share Posted May 28, 2009 (edited) Sleep(2000) Pauses the execution of the script for 2 seconds Edited May 28, 2009 by oMBRa Link to comment Share on other sites More sharing options...
Developers Jos Posted May 28, 2009 Developers Share Posted May 28, 2009 Hello, I need help pausing my script I made a while ago. I need it to pause for 2 seconds. Can some one give me the Code. Oh yea and here is my Script.Hey Hunter, What are those Sleep() statement used for in your script?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. Link to comment Share on other sites More sharing options...
Hunter Posted May 28, 2009 Author Share Posted May 28, 2009 Sleep(2000) Pauses the execution of the script for 2 secondsI haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing. Theirs 2 Sleeps in the script which one do I change it to? Link to comment Share on other sites More sharing options...
Negative1 Posted May 28, 2009 Share Posted May 28, 2009 add this to your code will cause a 2 second pause when the pause key is pressed. I'm sure you can add what you need from this. -1 HotKeySet("{Pause}", "pause") Func pause() ToolTip("Script is Paused.") sleep(2000) ToolTip("") EndFunc What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world. Link to comment Share on other sites More sharing options...
oMBRa Posted May 28, 2009 Share Posted May 28, 2009 I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing.why didn't you try yourself before posting?Theirs 2 Sleeps in the script which one do I change it to?I can not read your mind Link to comment Share on other sites More sharing options...
Negative1 Posted May 28, 2009 Share Posted May 28, 2009 (edited) I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing. Theirs 2 Sleeps in the script which one do I change it to? do you want the script to click once every 2 seconds? Func StartProg() while 1 MouseClick("left") Sleep(2000) ; sleep for 2 seconds before clicking left again. WEnd EndFunc Edited May 28, 2009 by Negative1 What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 28, 2009 Developers Share Posted May 28, 2009 I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing. Theirs 2 Sleeps in the script which one do I change it to?You know what: spend some time searching an testing yourself without bothering us.Comeback when you have a real questionJos 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. Link to comment Share on other sites More sharing options...
Recommended Posts