Core Function PixelGetMouse
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> PixelGetMouse ( ) </pre> === Description === Returns a pixel colour according to x, y position of the mouse pointer. === Parameters === None === Return Value === Succ...")
Newer edit →
(Created page with "<pre> PixelGetMouse ( ) </pre> === Description === Returns a pixel colour according to x, y position of the mouse pointer. === Parameters === None === Return Value === Succ...")
Newer edit →
Revision as of 22:27, 8 December 2011
PixelGetMouse ( )
Contents |
Description
Returns a pixel colour according to x, y position of the mouse pointer.
Parameters
None
Return Value
Success: Returns decimal value of pixel's colour.
Failure: Returns -1 if invalid coordinates.
Remarks
RGB colour mode is used by default but this can be changed using the ColourMode option.
Example
In this example pressing the "a" key will tell you the colour right at the mouse position
HotkeySet("a", "Get();"); Function Get() { $var = PixelGetMouse(); println( "The decmial color is $var | HEX '" . Hex($var, 6) ); } while(true) { DoEvents(); }