Sign in to follow this  
Followers 0
anhtrue

how to get color on screen

4 posts in this topic

i read help ,i only found three function : getblue,getred and getgreen but they aren't funtion which i want.

i want to get color on my screen at x ,y

how to do that?

and i wrote i program with lop function with

MsgBox(0, "Tutorial", "Hello World!")

but i dont know how to do that press any key and it appear , press a key it disappear and stop

can u give me the source code

sorry my english it not very good .

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$var = PixelGetColor( 10 , 100 ) ;this gets the color

MsgBox(0,"The decmial color is", $var) ;and this one dispays its value

MsgBox(0,"The hex color is", Hex($var, 6)) ;same with this one

is to get a color at x,y and im not sure what you mean for the second one

Edited by narayanjr

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

i read help ,i only found three function : getblue,getred and getgreen but they aren't funtion which i want.

i want to get color on my screen at x ,y

how to do that?

and i wrote i program with lop function with

MsgBox(0, "Tutorial", "Hello World!")

but i dont know how to do that press any key and it appear , press a key it disappear and stop

can u give me the source code

sorry my english it not very good .

1) PixelGetColor ( x , y )

2) i think msgbox cant do what u want... HIDE and SHOW

and i ddnt exacly understood what u meant but this is an example which i made for you:

#include <GuiConstants.au3>
HotkeySet("a", "_appear")
   HotKeySet("d", "_disappear")
   $maingui = GUICreate("TEST", 150, 50)
GUISetState(@SW_HIDE, $maingui) 
 GUICtrlCreateLabel("Hello World!", 45, 20, 70, 15)
   While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect   
    WEnd


Func _appear()
    GUISetState(@SW_SHOW, $maingui)
EndFunc

Func _disappear()
    GUISetState(@SW_HIDE, $maingui)
EndFunc
Edited by c4nm7

Share this post


Link to post
Share on other sites

thanks u very much ,this is source code which i want

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