Project

General

Profile

$mouse » History » Revision 2

Revision 1 (Per Amundsen, 08/12/2015 01:02 PM) → Revision 2/9 (Per Amundsen, 09/04/2015 09:29 AM)

_Added in 1.9.0_ 

 *$mouse* 

 Returns various properties about the mouse and keys pressed during [[Scripting_Events|events]]. 

 *Properties* 

 .lb - Returns [[$true]] if the mouse event occurred in a side-listbox otherwise [[$false]]. TODO ($false) 
 .x - Mouse X position relative to active window. 
 .y - Mouse Y position relative to active window. 
 .mx - Mouse X position relative to AdiIRC main window. 
 .my - Mouse Y position relative to AdiIRC main window. 
 .dx - Mouse X position relative to the desktop area. 
 .dy - Mouse Y position relative to the desktop area. 
 .key - Bitwise flag, see example. 

 *Example* 

 <pre> 
 alias Example { 
   ; Test $mouse.key for various values, more than one value can be true. 
   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. 
 } 

 ; Print mouse X and Y coordinates. 
 //echo -ag $mouse.x / $mouse.y 
 </pre>