Sign in to follow this  
Followers 0
caveman

hexadecimal input

3 posts in this topic

As the title indicates, i am trying to do a little macro which must use the hexadecimal input but the compiler does not accept the entry.but if I use decimal input everything is find.So to not lose from precision i want to use hexadecimal (and not a conversion). Can someone help me how to resolve the problem?

hee is the bloc of instruction:

Dim $var, $X, $Y

search()

;MsgBox (0 , "color", $var)

If $var = A4AF66 Then ; +++++++++++this is the line where the problem occurs

MouseClick ("left", $X, $Y, 1 ,1)

EndIf

Func search()

$X = Random (0, 1024, 1)

$Y = Random (0, 768, 1)

$var = Hex(PixelGetColor( $X, $Y))

EndFunc

thank you

Share this post


Link to post
Share on other sites



$var = PixelGetColor($x, $y)

If ($var == 0xA4AF66) Then


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.

Share this post


Link to post
Share on other sites

$var = PixelGetColor($x, $y)

If ($var == 0xA4AF66) Then

it's working....i thank to you

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