Advertisement
Guest User

PixelGetColor

a guest
Oct 10th, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.83 KB | None | 0 0
  1. ;~ Coder X0013
  2. ;~ Skype : x00.13
  3.  
  4. #include <GUIConstantsEx.au3>
  5. #include <StaticConstants.au3>
  6. #include <WindowsConstants.au3>
  7. #Region ### START Koda GUI section ### Form=
  8. $Form1 = GUICreate("Color", 343, 214, 192, 124,$WS_EX_TOPMOST)
  9. GUISetState(@SW_SHOWNORMAL)
  10. $Pic1 = GUICtrlCreatePic("", 0, 0, 340, 212)
  11. $Label1 = GUICtrlCreateLabel("Color", 8, 8, 344, 41)
  12. GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
  13. GUICtrlSetColor(-1, 0xFFFFFF)
  14.  
  15. #EndRegion ### END Koda GUI section ###
  16. HotKeySet("o","et")
  17. Func et()
  18.     Exit
  19. EndFunc
  20. While 1
  21.     $nMsg = GUIGetMsg()
  22.     Switch $nMsg
  23.         Case $GUI_EVENT_CLOSE
  24.             Exit
  25.         case $Pic1
  26. While 1
  27. Global $pp = MouseGetPos()
  28. Global $p = PixelGetColor($pp[0],$pp[1])
  29.  ToolTip("0x"&Hex($p),$pp[0],$pp[1],"Clor",4)
  30. GUISetBkColor("0x"&Hex($p))
  31. GUICtrlSetData($Label1,"0x"&Hex($p))
  32. WEnd
  33.     EndSwitch
  34. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement