demandnothing Posted September 15, 2009 Share Posted September 15, 2009 (edited) $x = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $color, 3, 2) If IsArray($x) = 1 Then Do MouseDown("primary") Until IsArray($x) = @error it clicks until i click again.. how would i do this because if i try Until @error Then MouseUp("primary"), it gives off a syntax error.. how would i write this out? Edited September 15, 2009 by demandnothing Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 15, 2009 Share Posted September 15, 2009 (edited) $x = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $color, 3, 2) If IsArray($x) = 1 Then Do MouseDown("primary") Until IsArray($x) = @error it clicks until i click again.. how would i do this because if i try Until @error Then MouseUp("primary"), it gives off a syntax error.. how would i write this out? You want: Until IsArray($x) = 0 Or maybe: Until Not IsArray($x) But there's another problem. Nothing changes the state of $x inside the loop. So how would it ever change to not being an array so the loop could exit? Did you mean to have PixelSearch() inside the loop too? Edited September 15, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
demandnothing Posted September 15, 2009 Author Share Posted September 15, 2009 (edited) it is in my program, i just typed that out here so you could see what i was working with.. thank you for your help the actual loop looks like While 1 If $ON = True Then $x = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $color, 3, 2) If IsArray($x) = 1 Then Do MouseDown("primary") Until IsArray($x) = 0 EndIf EndIf WEnd Edited September 15, 2009 by demandnothing 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