Jump to content

Recommended Posts

Posted

I am scanning a section of my screen for a pixel....

$coord   = PixelSearch ($bLeft, $bTop, $bRight, $bBottom, $bColor, $bTolerance, 3)

...and what I want to do is put a visible frame around the box so I can get a visual representation of the area I am scanning. I expect I can use DLLCall but I was wondering if anyone had any ideas on how I would approach this.

Posted

ah, got it... thanks a bunch!

Func DrawRectangle($bLeft, $bRight, $bBottom, $bTop, $color)  
; Left Line
    For $y = $bBottom to $bTop step -1
        PixelDraw($bLeft, $y, $color)
    Next
    
; Right Line
    For $y = $bBottom to $bTop step -1
        PixelDraw($bRight, $y, $color)
    Next
    
; Top Line
    For $x = $bRight to $bLeft step -1
        PixelDraw($x, $bTop, $color)
    Next
    
; Bottom Line
    For $x = $bRight to $bLeft step -1
        PixelDraw($x, $bBottom, $color)
    Next
EndFunc

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...