Sign in to follow this  
Followers 0
jessem

PixelSearch

3 posts in this topic

Ive used the search, however Pixel Search may be the most popular topic in the forums, sorry in advance if this is a repeat.

My question in quite easy, and though Im not new to AutoIt, Im new to using Pixel Search, because generally its a resource hog for me.

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

For some reason Im having troubles understanding this.

PixelSearch (0, 0, 1280, 1024, color [, shade-variation] [, step]] )

Shouldn't this cover the whole screen ?

Share this post


Link to post
Share on other sites



Well I hope your not using it with the brackets options, or quotes for that matter, or just the word color...

You could try:

Local $Color = 0x770000
While 1
    $PixSearch = PixelSearch(0, 0, @DeskTopWidth, @DeskTopHeight, $Color)
    If Not @error And IsArray($PixSearch) Then
        MsgBox(0, 'Found', 'Color was found at: x: ' & $PixSearch[0] & ' | y: ' & $PixSearch[1])
    EndIf
Wend

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Well I hope your not using it with the brackets options, or quotes for that matter, or just the word color...

You could try:

Local $Color = 0x770000
While 1
    $PixSearch = PixelSearch(0, 0, @DeskTopWidth, @DeskTopHeight, $Color)
    If Not @error And IsArray($PixSearch) Then
        MsgBox(0, 'Found', 'Color was found at: x: ' & $PixSearch[0] & ' | y: ' & $PixSearch[1])
    EndIf
Wend

At 4:06 in the morning you are too quick .. I just found @DesktopWidth , @DesktopHeight... Thank you !!!!!

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