vava Posted February 12, 2007 Share Posted February 12, 2007 i would like to loop it buy i have while statments issues i belive my while 1+1=2 makes it no good but i cant find a way to go back to 6th line automaticaly ty in advance Dim $color = PixelGetColor(290, 461) Dim $red = PixelGetColor(337,626) Dim $yellow = PixelGetColor(476,577) while 1+1=2 (while $color = PixelGetColor(290, 461) wend sleep (2000) if $red = PixelGetColor(337,626) Then MouseClick("left" , 290, 461 , 2 , 20) MouseClick("left" , 670, 558 , 1 , 20) else if $yellow > PixelGetColor(476,577) then MouseClick("left" , 413, 460 , 1 , 20) else MouseClick("left" , 619, 460 , 1 , 20) endif endif) wend Link to comment Share on other sites More sharing options...
Zedna Posted February 12, 2007 Share Posted February 12, 2007 Maybe: Dim $color = PixelGetColor(290, 461) Dim $red = PixelGetColor(337, 626) Dim $yellow = PixelGetColor(476, 577) While 1 While $color = PixelGetColor(290, 461) Sleep(100) WEnd Sleep(2000) If $red = PixelGetColor(337, 626) Then MouseClick("left", 290, 461, 2, 20) MouseClick("left", 670, 558, 1, 20) Else If $yellow > PixelGetColor(476, 577) Then MouseClick("left", 413, 460, 1, 20) Else MouseClick("left", 619, 460, 1, 20) EndIf EndIf WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search 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