bigal12 0 Posted May 16, 2011 hi i need help on a script, Func exitthescript() Exit EndFunc HotKeySet( "e", "exitthescript" ) While 1 ;MouseClick("left", x, y, Number click, speed,) MouseClick("left",1437,500) Sleep(1000) Send("{space}",0) WEnd i need this script to run for 15mins every 45mins any help would b grate, sorry if somthing like this has been posted regards bigal Share this post Link to post Share on other sites
Arterie 0 Posted May 16, 2011 (edited) Take a look at TimerInit and TimerDiff. e.g. $start = TimerInit() Loop If TimerDiff($start) >= (1000 * 60 * 45) Then Exitloop $start = TimerInit() Loop Your script Until TimerDiff($start) >= (1000 * 60 * 15) Then go back to the pause timerloop This is pseudo code but i think the idea is clear Edited May 16, 2011 by Arterie Share this post Link to post Share on other sites
ahmet 8 Posted May 16, 2011 Look in helpfile for TimerInit and TimerDiff. If you encounter difficulties feel free to ask Share this post Link to post Share on other sites
bigal12 0 Posted May 16, 2011 thanks will look it up Share this post Link to post Share on other sites
bigal12 0 Posted May 16, 2011 this is complicated, i am such a noob at this. i cant work out how to do it lol Share this post Link to post Share on other sites
hannes08 39 Posted May 16, 2011 Like Arterie already stated: Func exitthescript() Exit EndFunc HotKeySet( "e", "exitthescript" ) While 1 $t = timerInit() While 1 MouseClick("left",1437,500) Sleep(1000) Send("{space}",0) If TimerDiff($t) > 15*60*1000 Then ExitLoop WEnd Sleep(45 * 60 * 1000) Wend Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Share this post Link to post Share on other sites
bigal12 0 Posted May 16, 2011 i see(i am new to this)......... thankyou all for your help, problem solved Share this post Link to post Share on other sites