aviaf Posted August 13, 2008 Share Posted August 13, 2008 (edited) new at autoit and im trying to get the script to pause inbetween steps for a random amount of time: actually between 3000-24000 msI successfully made it sleep and pause the script by using:Sleep(3000)which makes it pause 3 secbut i want it to stop a random amount between 3-24 secso i thought to use:Sleep(Random ( [3000 [, 24000 [, 0]]] ))But when i run it it comes up with an error that says:"Sleep(Random ( [3000 [, 24000 [, 0]]] ))Sleep(Random ( ^ ERRORError: Error in expression."What am I doing wrong?Also, another problem, I want to add a little comment in the script so i can keep track of diff components of the script cuz its so long, what do i add to it so its not executed but just there like a description. thx Edited August 13, 2008 by aviaf Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 13, 2008 Moderators Share Posted August 13, 2008 The brackets are used to show you that those parameters are optional. Sleep(Random(3000, 24000, 1)) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
aviaf Posted August 14, 2008 Author Share Posted August 14, 2008 The brackets are used to show you that those parameters are optional.Sleep(Random(3000, 24000, 1))oh ok, thanks, it works now, (I took it straight from the help file and jsut changed min max, and flag )Anything for the second problem? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 14, 2008 Moderators Share Posted August 14, 2008 (edited) oh ok, thanks, it works now, (I took it straight from the help file and jsut changed min max, and flag )Anything for the second problem?Comments are used with a semi colon in autoit, or with #cs/#ce witch are all noted in the help file.Tutorials:http://www.autoitscript.com/forum/index.ph...c=19434&hl=http://www.autoitscript.com/forum/index.php?showtopic=21048 Edited August 14, 2008 by SmOke_N Typo Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
aviaf Posted August 14, 2008 Author Share Posted August 14, 2008 Comments are used with a semi colon in autoit, or with #cs/#ce witch are all noted in the help file.Tutorials:http://www.autoitscript.com/forum/index.ph...c=19434&hl=http://www.autoitscript.com/forum/index.php?showtopic=21048thx a lot, the speed of answers and solutions is amazingly fast here 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