Wabbit Posted September 25, 2006 Share Posted September 25, 2006 Hello! I'm new to AutoIT and scripting in general, but I am really amazed at this product! I could use some help on this: How can I make a random time monitor? Something that would pick a random amount of minutes, say between 30 and 90, wait that amount of time, then complete the program? Thanks! Link to comment Share on other sites More sharing options...
Developers Jos Posted September 25, 2006 Developers Share Posted September 25, 2006 (edited) Hello! I'm new to AutoIT and scripting in general, but I am really amazed at this product! I could use some help on this: How can I make a random time monitor? Something that would pick a random amount of minutes, say between 30 and 90, wait that amount of time, then complete the program? Thanks!this will pause randomly 30 to 90 minutes ... sleep(Random(30,90)*60*1000) Edited September 25, 2006 by JdeB 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...
Wabbit Posted September 25, 2006 Author Share Posted September 25, 2006 this will pause randomly 30 to 90 minutes ... sleep(Random(30,90)*60*1000) Hey, cool! What are the other entries (*60*1000)? Thanks! Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 25, 2006 Share Posted September 25, 2006 HI, sleep is millisec that way you get minutes. So long, Mega PS: To get minutes without sec look at the 3 parameter of Random! Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Uten Posted September 25, 2006 Share Posted September 25, 2006 I suppose you have figured it out already but you know 1h=60min=60000ms Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Valuater Posted September 25, 2006 Share Posted September 25, 2006 I suppose you have figured it out already but you know 1h=60min=60000ms1h=60min=36000001min=600008) Link to comment Share on other sites More sharing options...
Wabbit Posted September 25, 2006 Author Share Posted September 25, 2006 Ah, I get it. The *60*1000 multiplies the value so you don't have to list in miliseconds. Thanks! Link to comment Share on other sites More sharing options...
Uten Posted September 25, 2006 Share Posted September 25, 2006 :"> I knew I should not have skiped the sec stepp. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling 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