createMacro: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function createMacro== {{ProposedChange}} Creates a macro button for the current token. ===Usage=== <source lang="mtmacro" lines> [h: createMacro(label, command)] [h: createMacro(label...) |
No edit summary |
||
Line 5: | Line 5: | ||
===Usage=== | ===Usage=== | ||
<source lang="mtmacro" | <source lang="mtmacro" line> | ||
[h: createMacro(label, command)] | [h: createMacro(label, command)] | ||
[h: createMacro(label, command, props)] | [h: createMacro(label, command, props)] | ||
Line 28: | Line 28: | ||
'''Examples''' | '''Examples''' | ||
<source lang="mtmacro" | <source lang="mtmacro" line> | ||
[createMacro("Test", "this is a test", "autoExec=true;color=blue", ";") ] | [createMacro("Test", "this is a test", "autoExec=true;color=blue", ";") ] | ||
[createMacro("Another Test", "this is a test", "autoExec=true;color=red;fontColor=white", ";") ] | [createMacro("Another Test", "this is a test", "autoExec=true;color=red;fontColor=white", ";") ] |
Revision as of 05:42, 1 December 2008
Function createMacro
Note: This refers to a proposed change that has not been implemented in the main code base yet.
Creates a macro button for the current token.
Usage
[h: createMacro(label, command)]
[h: createMacro(label, command, props)]
[h: createMacro(label, command, props, delim)]
Where
- label is the label for the macro button.
- command is the command to run when the macro button is clicked.
- props is a string property list containing the properties for the button.
- delim is the delimiter used to separate the values in the string property list which defaults to ';' if not specified.
Valid Properties for Macro Buttons
- autoExec - true/false - Will the macro be automatically executed when the button is clicked on.
- color - The name of the color for the button.
- fontColor - The name of the font color for the button.
- includeLabel - true/false - Will the label be output when the button is clicked.
- group - The name of the group that the button is in.
- sortBy - The sort by value of the macro button.
- fontSize - The size of the font for the button.
- minWidth - the minimum width of the button.
Examples
[createMacro("Test", "this is a test", "autoExec=true;color=blue", ";") ]
[createMacro("Another Test", "this is a test", "autoExec=true;color=red;fontColor=white", ";") ]