Sign in to follow this  
Followers 0
NELyon

PixelSearch

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

[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

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

Share this post


Link to post
Share on other sites

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.

[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

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

Share this post


Link to post
Share on other sites

ok thats what i was trying to do, a full screen search.

Share this post


Link to post
Share on other sites

Take a look at what I've been working on.... you might be able to learn some stuff. Everything in there I learned from the forum and the help file.

PixelSearch & PixelCheckSum stuff


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

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