getMacroGroup: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) mNo edit summary |
No edit summary |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 8: | Line 8: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getMacroGroup(group) | getMacroGroup(group) | ||
getMacroGroup(group, delim) | getMacroGroup(group, delim) | ||
getMacroGroup(group, delim, tokenRef) | |||
getMacroGroup(group, delim, tokenRef, mapRef) | |||
getMacroGroup(group, delim, | </syntaxhighlight> | ||
</ | |||
'''Parameters''' | '''Parameters''' | ||
{{param|group|The name of the macro group to get the macro button indexes from.}} | |||
{{param|delim|The delimiter used in the string list returned, defaults to {{code|","}}. If set to {{code|json}}, then a JSON array is returned.}} | |||
{{param|tokenRef|Either the token [[getSelected|{{code|id}}]] or [[getTokenName|Token Name]] of the token. | |||
From v1.15, accepts "campaign" and "gm" as ids for the relevant panels. If the id is not specified, this function does not require a Trusted Macro.}} | |||
{{param|mapRef|The Name or ID of the map to find the token. Defaults to the current map.}} | |||
{{Note|Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.}} | |||
|changes= | |||
{{change|1.5.11|Added {{code|mapname}} parameter option.}} | |||
{{change|1.15|Addition of "gm" and "campaign" options for id}} | |||
}} | }} | ||
[[Category:Metamacro Function]] | [[Category:Metamacro Function]] |
Latest revision as of 23:59, 10 May 2024
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
getMacroGroup() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b51
Gets the indexes of the macro buttons for the specified group.
Usage
getMacroGroup(group)
getMacroGroup(group, delim)
getMacroGroup(group, delim, tokenRef)
getMacroGroup(group, delim, tokenRef, mapRef)
Parameters
group
- The name of the macro group to get the macro button indexes from.delim
- The delimiter used in the string list returned, defaults to","
. If set tojson
, then a JSON array is returned.tokenRef
- Either the tokenid
or Token Name of the token.
From v1.15, accepts "campaign" and "gm" as ids for the relevant panels. If the id is not specified, this function does not require a Trusted Macro.
mapRef
- The Name or ID of the map to find the token. Defaults to the current map.
Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.
Version Changes
- 1.5.11 - Added
mapname
parameter option. - 1.15 - Addition of "gm" and "campaign" options for id