# HOW DO I GET DO UNTIL TO WORK WITH A PIXEL SEARCH?

## Recommended Posts

IM WRITEING A SCRPIT FOR A GAME AND I WANT IT TO TARGET NEAREST MOB (WITCH IS MY C KEY) THEN SEARCH FOR THE PORTRAIT AND IF IT SEE'S A PORTEAIT THEN ATTACK THE TARGET (WITCH IS 3 AND 4 UNTILL THE MOB DIES AND PORTRAIT DROPS THEN CONTINUE ON WITH MY SCRIPT BUT I CANT SEEM TO GET IT TO DO THE UNTIL IT JUST KEEPS RUNNING 3 AND 4 PART OF THE LOOP AND NEVER MOVES ON TO THE 8 PART HOW DO I WRITE THIS? I WOULD APPRICIATE ANY HELP THX

While 1

If \$t = 1 Then

Sleep(1000)

Send("c")

Sleep(1000)

; Find a pure red pixel or a red pixel within 10 shades variations of pure red

\$coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )

Do

Sleep(1000)

Send("3")

Sleep(1000)

Send("4")

Sleep(1000)

Until \$coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )

Sleep(1000)

EndIf

SLEEP(1000)

SEND("8")

SLEEP(1000)

Endif

WEndT IT TO DO

##### Share on other sites

IM WRITEING A SCRPIT FOR A GAME...

This thread probably belongs over in the AutoIt Gaming and Bots forum. But you probably need to replace the line:

`Until \$coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )`

with this:

```\$coord = PixelSearch( 299, 54, 303, 65, 0x000000, 1 )
\$err = @error
Until Not \$err```
Edited by Squirrely1

##### Share on other sites

THAT WORKED THANK'S ALOT FOR THE HELP

##### Share on other sites

THAT WORKED THANK'S ALOT FOR THE HELP

Your CAPS key stuck or something ? Edited by Jos

Live for the present,
Dream of the future,
Learn from the past.

## Create an account

Register a new account

×

• Wiki

• Back

• Git