From WikiChip
$mouse Identifier - mIRC
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$mouse returns informations about the mouse and its buttons
Synopsis
$mouse
Paramters
None
Properties
This identifier almost uniquely takes no parameter but has properties ($insong and the like also have this}}, 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.