Jump to content

how to get color on screen


Recommended Posts

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 .

Link to comment
Share on other sites

$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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...