Project

General

Profile

Hotlink » History » Version 6

Per Amundsen, 01/07/2017 03:03 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 6 Per Amundsen
*Replace menu Example*
19 1 Per Amundsen
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
</pre>
33 6 Per Amundsen
34
*Append menu Example*
35 1 Per Amundsen
36 5 Per Amundsen
<pre>
37 1 Per Amundsen
; When right-clicking the word 'popup', open the default popup menu and add the custom '@popup' menu items.
38
on *:hotlink:popup:*:{
39
  if ($hotlink(event) == rclick) {
40
    hotlink -dm @popup
41
  }
42 5 Per Amundsen
}
43
44
; Create a popup menu called '@popup'.
45
menu @popup {
46
  Popup text:echo -ag Popup menu
47 1 Per Amundsen
}
48
</pre>