From WikiChip
$mouse Identifier - mIRC
< mirc‎ | identifiers
Revision as of 12:45, 28 October 2017 by 83.204.221.160 (talk) (Created page with "{{mirc title|$mouse Identifier}}'''$mouse''' returns informations about the mouse and its buttons == Synopsis == <pre>$mouse</pre> == Paramters == None == Properties == Th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

$mouse returns informations about the mouse and its buttons


Synopsis

$mouse

Paramters

None

Properties

This identifier uniquely takes no parameter but has properties, it is not possible to use such syntax for custom identifier, $myalias.prop would just call the alias named "$myalias.prop"

  • .x and .y - returns the position of the mouse relative to the active window
  • .mx and .my - returns the position of the mouse relative to the main mIRC window
  • .dx and .dy - returns the position of the mouse relative to the desktop window
  • .cx and .cy - returns position relative to the primary monitor.
  • .win - returns the name of the active window
  • .lb - returns $true if a mouse event occured over a listbox, $false otherwise.
  • .key - Returns a bitmask, you can use the bitwise & operator to check for button/shift/alt/control state:
    • if ($mouse.key & 1) echo left button is pressed.
    • if ($mouse.key & 2) echo control key is pressed.
    • if ($mouse.key & 4) echo shift key is pressed.
    • if ($mouse.key & 8) echo alt key is pressed.
    • if ($mouse.key & 16) echo right mouse button is pressed.


Example

//echo -a $mouse.x

Compatibility

Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also

$click