Masterphilly Posted November 1, 2010 Posted November 1, 2010 hello everybody, i'm new to AutoIt, it's only been about 2 weeks since i started, but i understand most of the basics so i was trying to create a script to play this armorgames called Podz. it involves click on all the green balls before the time runs out. i was trying to make it so everytime you press "s" it would do the function. this is because you have to press a button in between each level. i also wanted to make so you could press "e" to end the function so this is what i have so far: #include <misc.au3> $xcor = 259 $ycor = 200 $da = 1 Func podz() sleep(100) while $ycor < 593 If _IsPressed("45") Then ExitLoop While $xcor < 727 MouseMove( $xcor, $ycor,0) If PixelGetColor($xcor,$ycor) = 10870552 Then MouseClick("left") $xcor += 2 WEnd $ycor+=3 mousemove(0, $ycor,0) $xcor = 0 WEnd EndFunc While 1 if _IsPressed("53") then podz() WEnd
Masterphilly Posted November 1, 2010 Author Posted November 1, 2010 nevermind, i figured it out, i just reset the variables: While 1 if _IsPressed("53") then $xcor = 259 $ycor = 200 podz() EndIf WEnd
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