Jump to content
Sign in to follow this  
Mysis

PixelSearch syntax error

Recommended Posts

Mysis

Hi, I am making a very small widget that searches for a pure blue pixel (hex: 0000FF) on the screen, then gives you the coordinates of it.

$pixcoor = PixelSearch(610, 53, 805, 245, 0000FF)

MsgBox(0, "Blue Pixel x,y:", $pixcoor[0] & "," & $pixcoor[1])

When i run it in SciTE, it gives me a syntax error on 0000FF.

Any suggestions?

Thanks,

Mysis

Edited by Mysis

Share this post


Link to post
Share on other sites
GordonFreeman

and 0x0000FF

"0x"

$pixcoor = PixelSearch(610, 53, 805, 245, 0x0000FF)
If @error <> 1 Then
MsgBox(0, "Blue Pixel x,y:", $pixcoor[0] & "," & $pixcoor[1])
EndIf

;color Colour value of pixel to find (in decimal or hex).

;Failure: Sets @error to 1 if color is not found.
Edited by GordonFreeman

Share this post


Link to post
Share on other sites
Mysis

Thanks, wasn't in the help file. (except for the examples I never look at)

Share this post


Link to post
Share on other sites
GordonFreeman

Thanks, wasn't in the help file. (except for the examples I never look at)

I use a lot the help file. But still once in a while I do not see something :D

You need to use the help file more

Edited by GordonFreeman

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.