Project

General

Profile

$mouse » History » Version 1

Per Amundsen, 08/12/2015 01:02 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$mouse*
4
5
Returns various properties about the mouse and keys pressed during [[Scripting_Events|events]].
6
7
*Properties*
8
9
.lb - TODO ($false)
10
.x - Mouse X position relative to active window.
11
.y - Mouse Y position relative to active window.
12
.mx - Mouse X position relative to AdiIRC main window.
13
.my - Mouse Y position relative to AdiIRC main window.
14
.dx - Mouse X position relative to the desktop area.
15
.dy - Mouse Y position relative to the desktop area.
16
.key - Bitwise flag, see example.
17
18
*Example*
19
20
<pre>
21
alias Example {
22
  ; Test $mouse.key for various values, more than one value can be true.
23
  if ($mouse.key & 1) echo left button is pressed.
24
  if ($mouse.key & 2) echo control key is pressed.
25
  if ($mouse.key & 4) echo shift key is pressed.
26
  if ($mouse.key & 8) echo alt key is pressed.
27
  if ($mouse.key & 16) echo right mouse button is pressed.
28
}
29
30
; Print mouse X and Y coordinates.
31
//echo -ag $mouse.x / $mouse.y
32
</pre>