From WikiChip
Difference between revisions of "mirc/commands/hotlink"
(Created page with "The '''/hotlink command''' can be used to override the default menu as well as add additional items to the default menu from within the on hotlink event. This event can only ...") |
m (→Compatibility: /hotlink command was added in 7.23) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | The '''/hotlink command''' can be used to override the default menu | + | {{mirc title|/hotlink Command}} |
− | + | The '''/hotlink command''' can be used to override the default popups menu when right clicking a word and triggering the {{mIRC|on hotlink}} event. | |
− | |||
− | |||
− | |||
− | |||
− | |||
== Synopsis == | == Synopsis == | ||
Line 11: | Line 6: | ||
== Switches == | == Switches == | ||
− | * '''-m''' - Creates a popup menu using a custom @menu | + | * '''-m''' - Creates a custom popup menu using a custom @menu |
− | * '''-d''' - | + | * '''-d''' - If you are rightclicking a type recognized by mIRC (such as an url, a nickname, or a channel), it adds the default popups for that type to the final popups menu |
== Parameters == | == Parameters == | ||
− | * '''@menu''' - a custom menu to be used for the popup menu | + | * '''@menu''' - a custom menu to be used for the popup menu (only needed if you use -m) |
+ | |||
== Example == | == Example == | ||
− | + | 1) Add a right click menu item to look up commands and identifiers in the help file on mouse hover of /command and $identifier. | |
<syntaxhighlight lang="mIRC">menu @helppop { | <syntaxhighlight lang="mIRC">menu @helppop { | ||
Lookup Help $1:!help $remove($1, $chr(40), $chr(41)) | Lookup Help $1:!help $remove($1, $chr(40), $chr(41)) | ||
} | } | ||
− | on | + | on $*:hotlink:/^[/$]\S+/:*:{ |
if ($hotlink(event) == rclick) { | if ($hotlink(event) == rclick) { | ||
hotlink -m @helppop | hotlink -m @helppop | ||
Line 29: | Line 25: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | = | + | 2) Override mIRC's default popups for nickname and replace them with... mIRC's default popups! (useless but that's to show /hotlink -d, this isn't handling /return or halt to show the hand) |
− | + | ||
+ | <syntaxhighlight lang="mIRC"> | ||
+ | on *:hotlink:*:*:{ | ||
+ | if ($hotlink(event) $hotlink(match).type == rclick nick) { | ||
+ | ;no @menu with -d | ||
+ | hotlink -d | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
− | |||
− | + | == Compatibility == | |
+ | {{mIRC compatibility|7.23}} | ||
== See also == | == See also == | ||
− | * | + | * {{mIRC|$hotline}} |
− | * | + | * {{mIRC|$hotlinepos}} |
− | * | + | * {{mIRC|$hotlink}} |
− | * | + | * {{mIRC|on hotlink}} |
+ | {{mIRC command list}} | ||
[[Category:mIRC commands]] | [[Category:mIRC commands]] |
Latest revision as of 16:18, 16 August 2021
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The /hotlink command can be used to override the default popups menu when right clicking a word and triggering the on hotlink event.
Synopsis[edit]
/hotlink -md [@menu]
Switches[edit]
- -m - Creates a custom popup menu using a custom @menu
- -d - If you are rightclicking a type recognized by mIRC (such as an url, a nickname, or a channel), it adds the default popups for that type to the final popups menu
Parameters[edit]
- @menu - a custom menu to be used for the popup menu (only needed if you use -m)
Example[edit]
1) Add a right click menu item to look up commands and identifiers in the help file on mouse hover of /command and $identifier.
menu @helppop { Lookup Help $1:!help $remove($1, $chr(40), $chr(41)) } on $*:hotlink:/^[/$]\S+/:*:{ if ($hotlink(event) == rclick) { hotlink -m @helppop } }
2) Override mIRC's default popups for nickname and replace them with... mIRC's default popups! (useless but that's to show /hotlink -d, this isn't handling /return or halt to show the hand)
on *:hotlink:*:*:{ if ($hotlink(event) $hotlink(match).type == rclick nick) { ;no @menu with -d hotlink -d } }
Compatibility[edit]
Added: mIRC v7.23
Added on: 19 Mar 2012
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC commands list