Escape pour quitter, 's' pour sauver les infos.
Code : Tout sélectionner
#Include <Constants.au3>
HotKeySet("{s}", "infos")
HotKeySet("{ESC}", "MyExit")
While 1
$pos = MouseGetPos()
$color=PixelGetColor ( $pos[0] , $pos[1] )
$R=BitAND( BitShift($Color, 16), 0xff)
$G=BitAND( BitShift($Color, 8), 0xff)
$B=BitAND($Color, 0xff)
ToolTip("X:"&$pos[0]&@CRLF&"Y:"&$pos[1]&@CRLF&"#"&Hex($Color, 6)&@CRLF&"R:"&$R&@CRLF&"G:"&$G&@CRLF&"B:"&$B)
WEnd
Func infos()
Filewrite("infos.htm", "<font face=Verdana size=1><b>["&@mday&"."&@mon&" "&@HOUR & ":" &@MIN & ":" &@SEC & "]</b><br/> X:"&$pos[0]&"<br/>"&"Y:"&$pos[1]&"<br/>"&"#"&Hex($Color, 6)&"<br/>"&"R:"&$R&"<br/>"&"G:"&$G&"<br/>"&"B:"&$B&"<br/><br/>")
Endfunc
Func MyExit()
Exit
EndFunc