From WikiChip
Difference between revisions of "mirc/commands/hotlink"
m (bot: sort-key added to category) |
m (→Compatibility: /hotlink command was added in 7.23) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{mirc title|/hotlink Command}} |
− | The '''/hotlink command''' can be used to override the default menu | + | 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 12: | 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 | ||
} | } | ||
}</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 == | == Compatibility == | ||
Line 34: | Line 40: | ||
== See also == | == See also == | ||
− | |||
− | |||
* {{mIRC|$hotline}} | * {{mIRC|$hotline}} | ||
* {{mIRC|$hotlinepos}} | * {{mIRC|$hotlinepos}} | ||
+ | * {{mIRC|$hotlink}} | ||
+ | * {{mIRC|on hotlink}} | ||
{{mIRC command list}} | {{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