Jump to content
Sign in to follow this  
snoopy

Pexel Search and-click

Recommended Posts

snoopy

Code:

$pixelcolor=PixelGetColor(73,83) ;

MsgBox(0,"",$pixelcolor) ;

$pixelSearch=PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xA2D48B) ;

If IsArray($pixelSearch)=1 Then ;

MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0) ;

EndIf

ok... all I want to know is whats the point of putting the position as you can see on 1st line , if its gonna find the pixel anyway?

if i allredy got the pixel 0xA2D48B is there aneed in the first line ? thank you

Edited by snoopy

Share this post


Link to post
Share on other sites
snoopy

becasue your pixelsearch searches an area for the color you want, and returns the pixel location.

pixelgetcolor returns the color of that specific pixel... so the are 2 very different

Tnx m8

Share this post


Link to post
Share on other sites
snoopy

BTW

code:

$pixelcolor=PixelGetColor(57,45)

MsgBox(0,"",$pixelcolor)

$pixelSearch=PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xB4EC8F)

If IsArray($pixelSearch)=1 Then

MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0)

EndIf

$pixelcolor=PixelGetColor(154,60)

MsgBox(0,"",$pixelcolor)

$pixelSearch=PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0809C4

If IsArray($pixelSearch)=1 Then

MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0)

how do i make that after the 1st was clicked do the 2nd search and click it?

Share this post


Link to post
Share on other sites
Aceguy

try not to search you entire desktop for a single pixel, narrow your search down.

how do i make that after the 1st was clicked do the 2nd search and click it?

$pixelSearch=PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xB4EC8F)
If IsArray($pixelSearch)=1 Then 
MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0) 
EndIf
$pixelSearch=PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0809C4 )
If IsArray($pixelSearch)=1 Then 
MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0)
Edited by Aceguy

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  

×