Sign in to follow this  
Followers 0
Therapist

PixelSearch and Do..Until.

2 posts in this topic

#1 ·  Posted (edited)

I just dont seem to find a way around this:

PixelSearch(833,620,834,621,0x1F1F1F,0,0)
       If @error = 1 Then
            .
            .
            .
            Do
               PixelSearch(833,620,834,621,0x1F1F1F,0,0)
               Sleep(1000)
            Until @error = 0 ; problem seems to be here...
            .
            .
       Endif

The Do..Until loop does not seem to function when @error = 1 . I dont know what to do now, if you are unclear of what I'm trying achieve here, please do ask.

Edited by Therapist

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Sorry for the bother it seems I found my way, lol :)

Just if your interested I did this instead:

PixelSearch(833,620,834,621,0x1F1F1F,0,0)
If @error = 1 Then
   If @error = 1 Then
            .
            .
            .
          EndIf
   PixelSearch(833,620,834,621,0x1F1F1F,0,0)
   While @error = 1
         sleep(1000)
         PixelSearch(833,620,834,621,0x1F1F1F,0,0)
   WEnd
If @error = 0 Then
            .
            .
EndIf
      EndIf

It just works the way I want it to. :mellow:

Edited by Therapist

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