macroLink: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function macroLink== Creates the HTML for a link which will run the specified macro when clicked on. ===Usage=== <source lang="mtmacro" line> [r: = macroLink(text, macro)] [r: = mac...) |
No edit summary |
||
Line 33: | Line 33: | ||
To create a link that will call a macro called Test on the [[Token:LibToken|Lib:Token]] named Lib:Test that says "''click on me''" and displays the output to the GM. | To create a link that will call a macro called Test on the [[Token:LibToken|Lib:Token]] named Lib:Test that says "''click on me''" and displays the output to the GM. | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: macroLink("click on me", "Test@Lib:Test", "gm")] | [r: macroLink("click on me", "Test@Lib:Test", "", "gm")] | ||
</source> | </source> |
Revision as of 11:21, 13 December 2008
Function macroLink
Creates the HTML for a link which will run the specified macro when clicked on.
Usage
[r: = macroLink(text, macro)]
[r: = macroLink(text, macro, output, args)]
[r: = macroLink(text, macro, output, args)]
[r: = macroLink(text, macro, output, args, target)]
- text is the text to display for the link.
- macro is the name of the macro to run when the link is clicked.
The macro is in the same format that is used for [macro(...): ...] e.g. Test@Lib:test
- output contains who the output of the macro should go to, values are (defaults to none)
- self - Display only to person who clicked on the link.
- gm - Display to GM.
- all - everyone (acts like a /say)
- none - discard any output.
- args Any arguments to be passed to the macro when it is called.
- target Which tokens to run the macro on. Target can be one or more of the following (separated by ",")
Examples
To create a link that will call a macro called Test on the Lib:Token named Lib:Test that says "click on me" and displays the output to the GM.
[r: macroLink("click on me", "Test@Lib:Test", "", "gm")]