nessi Posted July 1, 2015 Share Posted July 1, 2015 hihow can i make the script wait 5 minuets before it continuous to the next line ? Thanks Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2015 Share Posted July 1, 2015 Sleep(1000 * 60 * 5) ; 1 second x 60 = 1 minute, x 5 = 5 minutes AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted July 1, 2015 Share Posted July 1, 2015 Welcome to AutoIt and the forum,Can you please explain why you want your script to wait for 5 minutes? If you use Sleep how would you exit the script while it is waiting for 5 minutes? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Sodori Posted July 1, 2015 Share Posted July 1, 2015 (edited) Local $time = TimerInit() While TimerDiff($time) < 1000 * 60 * 5 ; 1 second x 60 = 1 minute, x 5 = 5 minutes Sleep(200) WEndNo peeking unless you want to spoil the fun That's at least how I'd do it if I wanted to terminate the program when it's pausing. PS. Welcome to this awesome community ^^ Edited July 1, 2015 by Sodori Wanted to say "welcome" :) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 1, 2015 Moderators Share Posted July 1, 2015 (edited) I think water's post contains the point the OP should think through. WHY is the 5 minute wait necessary? Is it an arbitrary amount of time, or is he waiting for some sort of trigger (then conclusion of an application install, the appearance of a window, etc. etc) that usually takes about 5 minutes? Much better to code for the event than simply locking yourself into a long sleep. @OP the more information you can provide us, the more assistance we can provide you Edited July 1, 2015 by JLogan3o13 Sodori 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2015 Share Posted July 1, 2015 HotKey will interrupt sleep since it is a series of small WINAPI sleeps.HotKeySet("{Esc}", "_Exit") Sleep(1000 * 60 * 5) Func _Exit() Exit EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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