Jump to content

problem with 2 looping pixel searches


Recommended Posts

My script has 2 looping pixelsearches with both looping until the pixel is found with do....until.

The script says, error until has no matching Do statement

Plz help fix this script ASAP

Do ; This Do

PixelSearch(146,77,209,84,0x00D900,100)

if @error then

Send("{F1}")

Sleep(200)

Send("{3}")

Elseif

sleep(1000)

Send("{1}")

Sleep(2900)

Send("{2}")

$ECombat=pixelsearch(346,212,648,413,0xFF112A,100)

Until @error ;<-------This until

Edited by Dtvscrotes
Link to comment
Share on other sites

You also have to provide a conditional statement with ElseIf.

Try this, maybe:

Do ; This Do
PixelSearch(146,77,209,84,0x00D900,100)
if @error then
Send("{F1}")
Sleep(200)
Send("{3}")
Else
sleep(1000)
Send("{1}")
Sleep(2900)
Send("{2}")
$ECombat=pixelsearch(346,212,648,413,0xFF112A,100)
EndIf
Until @error ;<-------This until
Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Here's an example of their uses:

If $var > 0 Then
    MsgBox(4096,"", "Value is positive.")
ElseIf $var < 0 Then
    MsgBox(4096,"", "Value is negative.")
Else
    If StringIsXDigit ($var) Then
        MsgBox(4096,"", "Value might be hexadecimal!")
    Else
        MsgBox(4096,"", "Value is either a string or is zero.")
    EndIf
EndIf

I already reposted it for you. Look a few posts up.

Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...