Project

General

Profile

Hotlink » History » Version 9

Per Amundsen, 02/16/2023 12:44 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 9 Per Amundsen
table(ktable).
12
|*Switch*|*Description*|
13
| -m | Creates and opens a popup menu using a custom @menu |
14
| -d | If @menu is defined, adds the menu items from @menu to the default popup menu, otherwise shows the default popup menu. |
15 1 Per Amundsen
16
*Parameters*
17
18 9 Per Amundsen
table(ktable).
19
|*Parameter*|*Description*|
20
| [@menu] | Custom popup menu. |
21 1 Per Amundsen
22 6 Per Amundsen
*Replace menu Example*
23 1 Per Amundsen
24
<pre>
25
; Create a popup menu called '@popup'.
26
menu @popup {
27
  Popup text:echo -ag Popup menu
28
}
29
30
; When right-clicking the word 'popup', open the custom '@popup' menu.
31
on *:hotlink:popup:*:{
32
  if ($hotlink(event) == rclick) {
33
    hotlink -m @popup
34
  }
35
}
36
</pre>
37 6 Per Amundsen
38
*Append menu Example*
39 1 Per Amundsen
40 5 Per Amundsen
<pre>
41 7 Per Amundsen
; Create a popup menu called '@popup'.
42
menu @popup {
43
  Popup text:echo -ag Popup menu
44
}
45
46 8 Per Amundsen
; When right-clicking the word 'popup', open the default popup menu and appends the custom '@popup' menu items.
47 5 Per Amundsen
on *:hotlink:popup:*:{
48
  if ($hotlink(event) == rclick) {
49
    hotlink -dm @popup
50
  }
51 1 Per Amundsen
}
52
</pre>