From WikiChip
Editing mirc/commands/hotlink

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
 
{{mirc title|/hotlink Command}}
 
{{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.
+
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 be used during the right-click event:
 +
 
 +
<syntaxhighlight lang="mIRC">if ($hotlink(event) == rclick) {
 +
    ; hotlink code
 +
}</syntaxhighlight>
  
 
== Synopsis ==
 
== Synopsis ==
Line 6: Line 12:
  
 
== Switches ==
 
== Switches ==
* '''-m''' - Creates a custom popup menu using a custom @menu
+
* '''-m''' - Creates a 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
+
* '''-d''' - Adds the items from @menu to the default popup menu
  
 
== Parameters ==
 
== Parameters ==
* '''@menu''' - a custom menu to be used for the popup menu (only needed if you use -m)
+
* '''@menu''' - a custom menu to be used for the popup menu
 
 
  
 
== 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.
+
The following example will add a right click menu item to look up commands and identifiers in the help file on mouse hover.
  
 
<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 $*:hotlink:/^[/$]\S+/:*:{
+
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 40: Line 34:
  
 
== See also ==
 
== See also ==
 +
* [[List of commands - mIRC|List of commands]]
 +
* [[List of identifiers - mIRC|List of identifiers]]
 
* {{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|hotlink command - mIRC]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)