Jump to content

Recommended Posts

Posted (edited)

I'm makeing a simple script I got it all done but one part when it reads a bar (some times it moves so I want it to read 3 spots).

This is what I have the x and y are rite I've cheacked them 4 times. What it does is it doesnt stop looping when 16448766 is at one of the 3. what I'm I doning worng?

Its prolby way worng

$var1 = 16448766;bar pos 1
$var2 = 16448766;bar pos 2
$var3 = 16448766;bar pos 3

While 1
    
IF $var1 = PixelGetColor( 276,268 ) Then  
    Sleep(1000)

Elseif $var2 = PixelGetColor( 276,276 )Then 
    Sleep(1000)

Elseif $var3 = PixelGetColor( 276,290 )Then 
    Sleep(1000)
    
EndIf


Send ("^G")
Sleep(1000)
Send ("{ENTER}")
Sleep(3000)

WEnd

Or should I take all that out and try something else? If so like what?

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Posted

Try this. You may want to add some way to exit in case it never finds the color.

Kohr

$color = 16448766
$found = 0
While 1
    $var = PixelGetColor( 276,268 )
    If $var = $color Then
        $found = 1
    EndIf
    $var = PixelGetColor( 276,276 )
    If $var = $color Then
        $found = 1
    EndIf
    $var = PixelGetColor( 276,290 )
    If $var = $color Then
        $found = 1
    EndIf
    Sleep(1000)
    If $found = 1 Then
        Send ("^G")
        Sleep(1000)
        Send ("{ENTER}")
        Sleep(3000)
        ExitLoop        ;It exits the loop here if it is found
    EndIf
WEnd
Posted

I try that but It doesn't seem to work rite. The script gets to that part and just stops doesn't do the ctrl G or anything.

Thxs for the help tho.

I'm a newbie.Sorry if I don't reposed to your replays very fast.

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
  • Recently Browsing   0 members

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