From WikiChip
Difference between revisions of "mirc/commands/hotlink"
< mirc‎ | commands

(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 as well as add additional items to the default menu from within the on hotlink event.
+
{{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.
This event can only be used during the right-click event:
 
 
 
<syntaxhighlight lang="mIRC">if ($hotlink(event) == rclick) {
 
    ; hotlink code
 
}</syntaxhighlight>
 
  
 
== 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''' - Adds the items from @menu to the default popup 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 ==
 
== 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 ==
The following example will add a right click menu item to look up commands and identifiers in the help file on mouse hover.
+
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 ^$*:hotlink:/^[/$]\S+/:*:{
+
on $*:hotlink:/^[/$]\S+/:*:{
 
   if ($hotlink(event) == rclick) {
 
   if ($hotlink(event) == rclick) {
 
     hotlink -m @helppop  
 
     hotlink -m @helppop  
Line 29: Line 25:
 
}</syntaxhighlight>
 
}</syntaxhighlight>
  
== Compatibility ==
+
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)
Added: mIRC v7.23
+
 
 +
<syntaxhighlight lang="mIRC">
 +
on *:hotlink:*:*:{
 +
  if ($hotlink(event) $hotlink(match).type == rclick nick) {
 +
    ;no @menu with -d
 +
    hotlink -d
 +
  }
 +
}</syntaxhighlight>
  
Added On: 19/03/2012
 
  
<small>Note: Individual switches were not taken into consideration.</small>
+
== Compatibility ==
 +
{{mIRC compatibility|7.23}}
  
 
== See also ==
 
== See also ==
* [[List of commands - mIRC|List of commands]]
+
* {{mIRC|$hotline}}
* [[List of identifiers - mIRC|List of identifiers]]
+
* {{mIRC|$hotlinepos}}
* [[$hotline identifier - mIRC|$hotline]]
+
* {{mIRC|$hotlink}}
* [[$hotlinepos identifier - mIRC|$hotlinepos]]
+
* {{mIRC|on hotlink}}
 +
{{mIRC command list}}
  
 
[[Category:mIRC commands]]
 
[[Category:mIRC commands]]

Latest revision as of 17:18, 16 August 2021

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]

v · d · e mIRC commands list

A /abook, /action, /add, /ajinvite, /alias, /aline, /ame, /amsg, /anick, /aop, /auser, /auto, /autojoin, /avoice, /away

B /background, /ban, /bcopy, /beep, /bindip, /bread, /break, /breplace, /bset, /btrunc, /bunset, /bwrite

C /channel, /clear, /clearall, /clearial, /cline, /clipboard, /close, /closechats, /closedccs, /closefserves, /closemsg, /cnick, /color, /colour, /comclose, /comlist, /commands, /comopen, /comreg, /continue, /copy, /creq, /ctcp, /ctcpreply, /ctcps

D /dcc, /dccserver, /dde, /ddeserver, /debug, /dec, /describe, /dialog, /did, /didtok, /disable, /disconnect, /dlevel, /dline, /dll, Template:mIRC/donotdisturb, /dns, /dqwindow, /drawcopy, /drawdot, /drawfill, /drawline, /drawpic, /drawrect, /drawreplace, /drawrot, /drawsave, /drawscroll, /drawsize /drawtext

E /ebeeps, /echo, /editbox, /else, /elseif, /emailaddr, /enable, /events, /exit

F /fclose, /filter, /findtext, /finger, /firewall, /flash, /flist, /flood, /flush, /flushini, /fnord, /font, /fopen, /fseek, /fsend, /fserve, /fullname, /fupdate, /fwrite

G /ghide, /gload, /gmove, /gopts, /goto, /gplay, /gpoint, /gqreq, /groups, /gshow, /gsize, /gstop, /gtalk, /gunload, /guser

H /hadd, /halt, /haltdef, /hdec, /hdel, /help, /hfree, /hinc, /hload, /hmake, /hotlink, /hop, /hsave

I /ial, /ialclear, /ialmark, /identd, /if, /ignore, /iline, /inc, /iuser

J /join

L /leave, /linesep, /links, /list, /load, /loadbuf, /localinfo, /log, /logview

M /maxdepth, /mdi, /me, /menubar, /mkdir, /mnick, /mode, /msg

N /noop, /notice, /notify

O /onotice, /omsg

P /pareline, /part, /partall, /pdcc, /perform, /play, /playctrl, /pop, /protect, /proxy, /pvoice

Q /qme, /qmsg, /query, /queryrn, /quit, /quote

R /raw, /registration, /reload, /remini, /remote, /remove, /rename, /renwin, /reseterror, /resetidle, /return, /returnex, /rlevel, /rline, /rmdir, /run, /ruser

S /save, /savebuf, /saveini, /say, /scid, /scon, /server, /set, /setlayer, /showmirc, /signal, /sline, /sockaccept, /sockclose, /socklist, /socklisten, /sockmark, /sockopen, /sockpause, /sockread, /sockrename, /sockudp, /sockwrite, /sound, /speak, /splay, /sreq, /strip, /switchbar

T /timer, /timestamp, /tip, /tips, /titlebar, /tnick, /tokenize, /toolbar, /topic /tray, /treebar

U /ulist, /unload, /unset, /unsetall, /updatenl, /url, /username, /uwho

V /var, /vcadd, /vcmd, /vcrem, /vol

W

X /xyzzy