m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +)) |
m (→Parameters: Link access levels) |
||
(18 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | The '''ON HOTLINK''' event | + | {{mirc title|On Hotlink - Events}} |
+ | 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 == | ||
<pre>ON <level>:HOTLINK:<matchtext>:<*#?=!@>:<commands></pre> | <pre>ON <level>:HOTLINK:<matchtext>:<*#?=!@>:<commands></pre> | ||
+ | |||
+ | You can use {{mirc|/return}} to enable hotlink over the current word and you can {{mIRC|/halt}} to disable hotlink and allows default processing. | ||
+ | |||
+ | $1 returns the word that matched, stripped from its control code. | ||
+ | |||
+ | '''Note''': $hotlink() can be used to get the word that matched with control codes preserved. | ||
+ | |||
+ | The event triggers for various mouse events: sclick, dclick, rclick, mouse, uclick, you can use {{mIRC|$hotlink|$hotlink()}} to get the mouse event as well as informations about the line number, the word position etc.. | ||
== Parameters == | == Parameters == | ||
− | <span style="display: inline-block; width: 105px;">'''<level>'''</span>The | + | <span style="display: inline-block; width: 105px;">'''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger. |
− | <span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The text that to be matched. Can also be a | + | <span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The text that to be matched. Can also be a {{mirc|wildcard}}. |
<span style="display: inline-block; width: 105px;">'''<*#?=!@>'''</span>The window type that this event should monitor. | <span style="display: inline-block; width: 105px;">'''<*#?=!@>'''</span>The window type that this event should monitor. | ||
Line 30: | Line 38: | ||
== Examples == | == Examples == | ||
− | Monitor all windows for | + | Monitor all windows for the a word matchting '*hoverme*' and echo to the active window the word that was hovered: |
<source lang="mIRC">ON *:HOTLINK:*hoverme*:*:echo -a $1 was just hovered!</source> | <source lang="mIRC">ON *:HOTLINK:*hoverme*:*:echo -a $1 was just hovered!</source> | ||
− | The | + | == Old on hotlink handling == |
+ | |||
+ | The event was revamped in mIRC 7.23, before, the event was working somewhat differently from others events: | ||
− | + | <source lang="mIRC"> | |
− | <source lang="mIRC"> | + | on ^*:HOTLINK:*help*:#:{ |
− | + | if ($1 == helpme) return | |
− | + | halt | |
} | } | ||
− | |||
− | + | on *:HOTLINK:*:*:echo clicked word $1 in line $hotline $hotlinepos | |
− | + | </source>The first ^ event is triggered when you move your mouse over a word that matches *help* in a channel window. You can then check $1 to see if you want the hotlink hand to appear over the word. If you halt the event, no hand will appear. The second non-^ event is triggered when you double-click on a word which has been filtered through the first hotlink event. | |
+ | |||
+ | This implementation was very limited and is deprecated, {{mirc|$hotline}} and {{mirc|$hotlinepos}} still work as they should with the new implementation but can be considered somewhat deprecated as the general {{mirc|$hotlink|$hotlink()}} now gathers all the precious informations. | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|5.61}} | |
== See Also == | == See Also == | ||
* {{mIRC|$hotline}} | * {{mIRC|$hotline}} | ||
* {{mIRC|$hotlinepos}} | * {{mIRC|$hotlinepos}} | ||
+ | * {{mIRC|$hotlink}} | ||
+ | * {{mIRC|/hotlink}} | ||
+ | |||
{{mIRC on event list}} | {{mIRC on event list}} | ||
− | [[Category: | + | [[Category:mIRC on events|hotlink]] |
Latest revision as of 06:41, 6 February 2024
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[edit]
ON <level>:HOTLINK:<matchtext>:<*#?=!@>:<commands>
You can use /return to enable hotlink over the current word and you can /halt to disable hotlink and allows default processing.
$1 returns the word that matched, stripped from its control code.
Note: $hotlink() can be used to get the word that matched with control codes preserved.
The event triggers for various mouse events: sclick, dclick, rclick, mouse, uclick, you can use $hotlink() to get the mouse event as well as informations about the line number, the word position etc..
Parameters[edit]
<level>The corresponding access levels 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[edit]
Monitor all windows for the a word matchting '*hoverme*' and echo to the active window the word that was hovered:
ON *:HOTLINK:*hoverme*:*:echo -a $1 was just hovered!
Old on hotlink handling[edit]
The event was revamped in mIRC 7.23, before, the event was working somewhat differently from others events:
on ^*:HOTLINK:*help*:#:{ if ($1 == helpme) return halt } on *:HOTLINK:*:*:echo clicked word $1 in line $hotline $hotlineposThe first ^ event is triggered when you move your mouse over a word that matches *help* in a channel window. You can then check $1 to see if you want the hotlink hand to appear over the word. If you halt the event, no hand will appear. The second non-^ event is triggered when you double-click on a word which has been filtered through the first hotlink event.
This implementation was very limited and is deprecated, $hotline and $hotlinepos still work as they should with the new implementation but can be considered somewhat deprecated as the general $hotlink() now gathers all the precious informations.
Compatibility[edit]
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.
See Also[edit]