Jump to content

PixelSearch


Recommended Posts

I don't really understand the PixelSearch thing.

Is it like: i wan't my mouse to move to something with the hex color 0x66aadc (A blueish color)

Would the code be:

PixelSearch( 0, 0, 20, 300, 0x66aadc, 10 )

?

I would like to know please. if thats not it, can someone guide me in the right direction?

ps: i also checked the help file but i didn't really understand that either

Link to comment
Share on other sites

  • Moderators

You have to give PixelSearch a variable name so you can get the Array it returns.

PixelSearch( 0, 0, 20, 300, 0x66aadc, 10 )oÝ÷ Ù8b²Ç­È^²Ú)çírçz»hÛLZÝôÓ&®¶­sbb33cµ6ö÷&BÒVÅ6V&6ÂÂ#Â3ÂcfF2¤b4'&b33cµ6ö÷&BFVâÖ÷W6T6Æ6²b33´ÆVgBb33²Âb33cµ6ö÷&E³ÒÂb33cµ6ö÷&E³ÒÂÂ

[0] = x position

[1] = y position

Edit:

Be sure to check the help file for Opt("PixelCoordMode", 0 - 1 - 2 for the correct setting, and make sure that Opt('MouseCoordMode', is the same as the PixelCoordMode, they both go at the top of your script before any Pixel or Mouse functions you invoke.

Edited by SmOke_N

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.

Link to comment
Share on other sites

  • Moderators

Thanks. that works but not for what i need. i will try a different approach

Sounds to me like you need to be a bit more specific in your help questions, what I posted will do "exactly" what you asked.

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.

Link to comment
Share on other sites

For people to help you truley with PixelSearch scripts, you need to specify the area of search, otherwise all we can say is

try

$coord = Pixelsearch(0, 0, @Desktopwidth, @DesktopHeight);Full Screen Search
If IsArray($coord) = 1 then
 MouseMove($coord[0], $coord[1])
Endif
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...