Jump to content
Sign in to follow this  
Dtvscrotes

problem with 2 looping pixel searches

Recommended Posts

Dtvscrotes

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

Share this post


Link to post
Share on other sites
CrewXp

...your forgot your EndIf....

Share this post


Link to post
Share on other sites
sandman

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]

Share this post


Link to post
Share on other sites
Dtvscrotes

Where?? i got an elseif is that fine???

Share this post


Link to post
Share on other sites
Dtvscrotes

can some one fix this and repost im lost with the elseif i had one so ????

Share this post


Link to post
Share on other sites
sandman

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]

Share this post


Link to post
Share on other sites
Dtvscrotes

oh cool ur original post worked TY

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  

×