Line 1: | Line 1: | ||
{{mirc title|On Hotlink - Events}} | {{mirc title|On Hotlink - Events}} | ||
− | The '''ON HOTLINK''' event | + | The '''ON HOTLINK''' event triggers when you use your mouse over a specific word in a line of text in a window. |
− | + | The '''ON HOTLINK''' event is very intensive, in that it monitors and tracks all mouse movements. | |
− | + | Therefore any commands executed in the event must be as quick, efficient, and small as possible. If the commands take too long to proceede, mIRC will begin to lag a great deal. | |
− | The '''ON HOTLINK''' event is very intensive, in that it monitors and tracks all mouse movements | ||
== Synopsis == | == Synopsis == |
Revision as of 19:12, 26 April 2019
The ON HOTLINK event triggers when you use your mouse over a specific word in a line of text in a window.
The ON HOTLINK event is very intensive, in that it monitors and tracks all mouse movements. Therefore any commands executed in the event must be as quick, efficient, and small as possible. If the commands take too long to proceede, mIRC will begin to lag a great deal.
Synopsis
ON <level>:HOTLINK:<matchtext>:<*#?=!@>:<commands>
Parameters
<level>The level for the event to trigger.
<matchtext>The text that to be matched. Can also be a wildcard.
<*#?=!@>The window type that this event should monitor.
<commands>The commands to be performed when the event listener's criteria is met.
Examples
Monitor all windows for both the text 'hoverme' and echo to the active window that the word was hovered:
ON *:HOTLINK:*hoverme*:*:echo -a $1 was just hovered!
The next example has 2 events. One contains an ^ prefix, which signifies elevation. This event will stop all hotlinks if the criteria set is not met. However, if criteria is met, and a match is made, the hotlink will become clickable (this is apparent when the mouse cursor becomes the hand-pointer).
The second event allows the double-click feature to return some information about the hotlink:
ON ^*:HOTLINK:*hoverme*:*:{ if ($1 == hoverme) return halt } ON *:HOTLINK:*hoverme*:*:echo -a Hotlink: $1 - Hotlink line: $hotline - Hotlink line and Word Position: $hotlinepos
Upon hovering over the word hoverme as shown in the above example, the following resembles the output:
Hotlink: hoverme - Hotlink line: hoverme - Hotlink line and Word Position: 1 269
Compatibility
Added: mIRC v5.61
Added on: 23 Sep 1999
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.