getMacroButtonIndex: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page GetMacroButtonIndex to getMacroButtonIndex: Converting page titles to lowercase) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getMacroButtonIndex() | getMacroButtonIndex() | ||
</ | </syntaxhighlight> | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: ind = getMacroButtonIndex()] | [h: ind = getMacroButtonIndex()] | ||
</ | </syntaxhighlight> | ||
If the macro is not run from an auto-execute macro button on a [[Token]], {{code|ind}} is set to {{code|-1}}. Otherwise {{code|ind}} is set to a non-negative number which is the index of the button. | If the macro is not run from an auto-execute macro button on a [[Token]], {{code|ind}} is set to {{code|-1}}. Otherwise {{code|ind}} is set to a non-negative number which is the index of the button. | ||
Latest revision as of 23:59, 14 March 2023
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
This article needs: Expanded examples of usage.
getMacroButtonIndex() Function
• Introduced in version 1.3b50
Returns the index of the Token macro button that was clicked on. The macro button must have the auto-execute check box selected. If the macro is not running from a Token macro button then
-1
is returned.Usage
getMacroButtonIndex()
Example
[h: ind = getMacroButtonIndex()]
ind
is set to -1
. Otherwise ind
is set to a non-negative number which is the index of the button.