julianser Posted November 7, 2010 Posted November 7, 2010 Hi Guys, I am new at scripting and after searching around the forum I can't find what I needed. I am trying to make a script which keys the {space} in a random delay of 1-4 secs for 15 mins, then stops for 45 mins then continues again in an endless loop. But I am stuck in setting the duration for the bot to run for 15 mins and then sleep for 45 mins. Appreciate it if anyone could help. What I have is this: Global $counter=0;globally declare $counter to the program, not just as a variable contained in a Function While 1 HotKeySet("{INSERT}","Start") HotKeySet("{END}","END") WEnd Func Start() $counter=1 While $counter=1 $randum = Random(1000, 4000, 1) Sleep($randum) Send("{space}") WEnd EndFunc Func End() $counter=0 EndFunc
Developers Jos Posted November 7, 2010 Developers Posted November 7, 2010 please read 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.
Recommended Posts