Preforx Posted October 3, 2009 Share Posted October 3, 2009 Hello, i have this Script: HotKeySet("{PAUSE}", "Start") HotKeySet("!{PAUSE}", "Quit") TogglePause() Func start() HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "TogglePause") ToolTip('AntiAFK started.', 0, 0) While 1 Send("I") Sleep(Random(120000, 240000, 320000)) WEnd EndFunc ;==>start Func TogglePause() ToolTip('AntiAFK Stopped.', 0, 0) HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "Start") While 1 Sleep(100) WEnd EndFunc ;==>TogglePause Func Quit() Exit EndFunc ;==>Quit I Want that this Script End after X Minutes, after it has been Started. Is it possible? Searched and tryed, but nothing Greetz Preforx Link to comment Share on other sites More sharing options...
Preforx Posted October 3, 2009 Author Share Posted October 3, 2009 Sorry dont know how to Edit in this Board. Find no function for this. Question for This: Or is it Possible to stop it at an specific time, like at 12am ? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 3, 2009 Developers Share Posted October 3, 2009 Have a look in the helpfile for the TimerInit() & TimerDiff() functions for checking the time passed and at the @hour, @min for testing for a particular time. 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...
Mat Posted October 3, 2009 Share Posted October 3, 2009 (edited) $min = 1 ; << The number of minutes to wait AdlibEnable ("_Exit", $min * 60 * 1000) While 1 Sleep (1000) ; script execution in here WEnd Func _Exit () Exit EndFunc ; ==> _Exit Mat Edit: It posted whilst I was halfway through writing!! And I never realised too... Above post was garbage and was deleted. Edited October 3, 2009 by Mat AutoIt Project Listing 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