Difference between revisions of "On hotlink"

From Scriptwiki
Jump to: navigation, search
m (Fixed $mouse.key being badly linked.)
m (Reverted edits by Albie (talk) to last revision by Aca20031)
Line 4: Line 4:
  
 
This form of the event, using the ^ event prefix, triggers when a user hovers over a word with his mouse, or when he right clicks on a word with his mouse.
 
This form of the event, using the ^ event prefix, triggers when a user hovers over a word with his mouse, or when he right clicks on a word with his mouse.
If [[$mouse.key]] indicates that the right mouse button was clicked (if ($mouse.key & 16) { }) then this word was right clicked, otherwise it was simply hovered over by the mouse.
+
If [[$mouse]].key indicates that the right mouse button was clicked (if ($mouse.key & 16) { }) then this word was right clicked, otherwise it was simply hovered over by the mouse.
  
 
'''Note: You can use the [[halt]] command to stop the hand from appearing automatically'''
 
'''Note: You can use the [[halt]] command to stop the hand from appearing automatically'''

Revision as of 13:42, 11 March 2011

Hotlink events are used to catch when a user hovers over a word, right clicks a word, or double clicks a word, in a normal window situation. Note: This does not work in dialogs

on ^<level>:HOTLINK:<matchtext>:<*#?=!@>:<commands>

This form of the event, using the ^ event prefix, triggers when a user hovers over a word with his mouse, or when he right clicks on a word with his mouse. If $mouse.key indicates that the right mouse button was clicked (if ($mouse.key & 16) { }) then this word was right clicked, otherwise it was simply hovered over by the mouse.

Note: You can use the halt command to stop the hand from appearing automatically

on <level>:HOTLINK:<matchtext>:<*#?=!@>:<commands>

This form of the event, without the ^ event prefix, triggers when a line is double clicked.

Use $hotline to get the line which triggered either event. Use $hotlinepos to get the word number, and line number, which triggered either event.


See Also