Sign in to follow this  
Followers 0
TheMna

pixelsearch right to left

5 posts in this topic

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

Share this post


Link to post
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


Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
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:

Much simpler will be to use DllCall() with PBM_GETPOS message if you need to get progressbar position.

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  
Followers 0