Sign in to follow this  
Followers 0
zaky324

Help with $PixelGetColor

8 posts in this topic

I'm not sure if i did it properly but it doesn't seem to do what i want it to.

Func Pixel()
WinActivate("a program")
Global $xCoordinate = 716      
Global $yCoordinate = 728            
Global $PixelColour = 0xFFFF00   
Global $Pixel
  Do
   MouseClick ("left", 791, 434, 1, 200)
   Sleep (4000)
   Send ("^f")
   Sleep (3000)
   MouseClick ("left", 849, 435, 1, 200)
   Sleep (1000)
   $Pixel = PixelGetColor($xCoordinate, $YCoordinate)
   Sleep(2000)
  Until Hex($Pixel, 6) = $PixelColour
Msgbox(0,"Colour Found", "The requested colour, "&$PixelColour&" was found at the coordinates of ("&$xCoordinate&","&$yCoordinate&").")
EndFunc

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

but it just kept clicking as if the pixel's func wasnt in it.

Edited by zaky324

Share this post


Link to post
Share on other sites

try pixel color without "0x"

Global $PixelColour = FFFF00

P.S. JohnOne was sarcastic

TIP Just explain what you whant. we cant gues

Share this post


Link to post
Share on other sites

this is wat i get if i do that, : ERROR: syntax error Global $PixelColour = FFFF00

Share this post


Link to post
Share on other sites

Srry forgot the comas. The hex function returns a string without the 0x

Global $PixelColour = "FFFF00"
1 person likes this

Share this post


Link to post
Share on other sites

you are my god

Share this post


Link to post
Share on other sites

ur welcome!

1 person likes this

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