setMacroCommand: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function setMacroCommand== {{TrustedOnlyFunction}} Sets the command that will be run when the Token:Macro Button is pressed. Note because of the way the parser interprets values w...) |
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=setMacroCommand | |||
|trusted=true | |||
|description | |||
Sets the command that will be run when the [[Token:Macro Button|Macro Button]] is pressed. Note because of the way the parser interprets values within [] you may have to use the [[Macros:Functions:encode| encode()]] and [[Macros:Functions:decode|decode()]] functions with the string. | Sets the command that will be run when the [[Token:Macro Button|Macro Button]] is pressed. Note because of the way the parser interprets values within [] you may have to use the [[Macros:Functions:encode| encode()]] and [[Macros:Functions:decode|decode()]] functions with the string. | ||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: setMacroCommand(buttonIndex, command)] | [h: setMacroCommand(buttonIndex, command)] | ||
</source> | </source> | ||
|examples= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: setMacroCommand(1, "[macro('Test@Lib:Test'): '']")] | [h: setMacroCommand(1, "[macro('Test@Lib:Test'): '']")] | ||
</source> | </source> | ||
}} | |||
[[Category:Metamacro Function]] |
Revision as of 04:17, 9 March 2009
setMacroCommand() Function
Note: This function can only be used in a Trusted Macro
Usage
[h: setMacroCommand(buttonIndex, command)]
Examples
[h: setMacroCommand(1, "[macro('Test@Lib:Test'): '']")]