Core Function PixelGetMouse
From Sputnik Wiki
(Difference between revisions)
m (1 revision) |
m (1 revision) |
Latest revision as of 12:37, 14 June 2015
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(); }