Sign in to follow this  
Followers 0
demandnothing

MouseDown() Until IsArray = @error

3 posts in this topic

#1 ·  Posted (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 by demandnothing

Share this post


Link to post
Share on other sites



#2 ·  Posted (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?

:D

Edited 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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by demandnothing

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0