hotwings Posted January 31, 2008 Posted January 31, 2008 I've entered the wonderful world of scripting now! Woohoo! I cant understand that you can do SOO much with scripting, its amazing, im excited. Well i wrote this program, and i was wondering if there was a command that just repeats your program after it finishes going through. (Instead of closing). Any fast help would be great.
narayanjr Posted January 31, 2008 Posted January 31, 2008 While 1 ;your code here Wend that will repeat your code over and over and over in an infinite loop
hotwings Posted January 31, 2008 Author Posted January 31, 2008 Ok i was trying to understand the WHILE loop in this program, now i understand it. Its much different than C++ heh, thanks for the fast reply.
hotwings Posted January 31, 2008 Author Posted January 31, 2008 I had some help from a friend, but now hes offline. Heres where i got to: #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 0 ) If _IsPressed("01", $dll) Then $i = 1 ExitLoop EndIf WEnd DllClose($dll) While $i < 10; Amount of times mouse button is clicked MouseClick("left") Sleep(500); Time between clicks in m/s (now 1sec) $i = $i+1 WEnd I want the whole thing to repeat, when i put a while loop around it, it doesnt seem to work, maybe im doing it wrong.
narayanjr Posted January 31, 2008 Posted January 31, 2008 #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 While 1 Sleep(100) If _IsPressed("01", $dll) Then $i = 1 ExitLoop EndIf WEnd While $i < 10; Amount of times mouse button is clicked MouseClick("left") Sleep(500); Time between clicks in m/s (now 1sec) $i = $i+1 WEnd WEnd DllClose($dll) That should work. I didn't test it though.
hotwings Posted January 31, 2008 Author Posted January 31, 2008 Yay! I get it now too. Man scripting is so fun hehe. Thanks a ton, ill be back soon!
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