Jump to content

pixelsearch right to left


Recommended Posts

I'd like to get pixelsearch to search right to left instead of left to right (default). If I was searching a block like (100,100) to (200,100) would it be possible to simply change the left,top,right,bottom to right,top,left,bottom and change the step to -1 to make it search right to left?

i.e. pixelsearch(200,100,100,100,-1)?

help appreciated

Link to comment
Share on other sites

No, you can only search left to right. You could get creative and search one column of pixels at a time and reduce the X coordinate each time.

Something like;

$X = 200
Do
    PixelSearch($X,100,$X +1,200)
    $X = $X -1
Until $X = 100

Untested and probably incomplete

Link to comment
Share on other sites

Well since I only need to check a horizontal strip (from a progress bar actually), I'll probably do something like:

$x=625
Do
    If PixelGetColor(x,442)=0x0000FF Then
        $FactionPercentage=$x/2
        ExitLoop
    EndIf
    $x-=
Until $x=425

TY

Edited by TheMna
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...