Jump to content

Recommended Posts

Posted
HotKeySet("^{SPACE}", "get_color")
$colorCodeHere =  ;<----------------
func get_color()
   Global $point = MouseGetPos()
   Global $color = PixelGetColor($point[0], $point[1])
   MsgBox(0, "debug", "result: " & $color)
EndFunc


While 1
   Sleep(100)
WEnd

Hello guys my problem is, how can i store the value that i get in that PixelGetColor($point[0], $point[0])

i know that when i msgbox the color i will show the = of $color

but i wanted it to be the value like  $colorCodeHere = 13456254. but  not hardcoding the value.

 

or how could i say 

if $color is = to $color then do this and if  $color is not  equal to $color then do that.

Posted
4 hours ago, Ian_Mac said:

but i wanted it to be the value like  $colorCodeHere = 13456254. but  not hardcoding the value.

What does it mean? With PixelGetColor() you have a decimal value of pixel's color, as it's described in the Help File.

4 hours ago, Ian_Mac said:

or how could i say 

if $color is = to $color then do this and if  $color is not  equal to $color then do that.

A simple ( based on how many comparsion you have to do ) If...Else...EndIf should fit your request:

If $intColorGet = $intColor Then
    ; Do something here 
Else
    ; Do something else here
EndIf

Tell us if something it's not clear enough to you :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

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
×
×
  • Create New...