Project

General

Profile

Hotlink » History » Version 5

Per Amundsen, 01/07/2017 03:02 PM

1 1 Per Amundsen
_Added in 2.7_
2
3
*/hotlink -md [@menu]*
4
5
Opens the default and/or a custom popup menu during a [[on HOTLINK]] right-click event.
6
7 4 Per Amundsen
_See also [[on HOTLINK]], [[$hotlink]], [[$hotline]], [[$hotlinepos]]._
8 2 Per Amundsen
9 1 Per Amundsen
*Switches*
10
11
-m - Creates and opens a popup menu using a custom @menu
12
-d - If @menu is defined, adds the menu items from @menu to the default popup menu, otherwise shows the default popup menu.
13
14
*Parameters*
15
16
[@menu] - Custom popup menu.
17
18
*Example*
19
20
<pre>
21
; Create a popup menu called '@popup'.
22
menu @popup {
23
  Popup text:echo -ag Popup menu
24
}
25
26
; When right-clicking the word 'popup', open the custom '@popup' menu.
27
on *:hotlink:popup:*:{
28
  if ($hotlink(event) == rclick) {
29
    hotlink -m @popup
30
  }
31
}
32 5 Per Amundsen
</pre>
33 1 Per Amundsen
34 5 Per Amundsen
<pre>
35 1 Per Amundsen
; When right-clicking the word 'popup', open the default popup menu and add the custom '@popup' menu items.
36
on *:hotlink:popup:*:{
37
  if ($hotlink(event) == rclick) {
38
    hotlink -dm @popup
39
  }
40 5 Per Amundsen
}
41
42
; Create a popup menu called '@popup'.
43
menu @popup {
44
  Popup text:echo -ag Popup menu
45 1 Per Amundsen
}
46
</pre>