getMacroIndexes: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=getMacroIndexes
|name=getMacroIndexes
|version=1.3b48
|description=Returns a list of the [[macro buttons]] on the [[Token:Current Token{{!}}Current Token]] that have the specified label. The type of the value returned depends on the delimiter parameter.  
|description=Returns a list of the [[macro buttons]] on the [[Token:Current Token{{!}}Current Token]] that have the specified label. The type of the value returned depends on the delimiter parameter.  
* If the delimiter is not specified then a [[Macros:string list{{!}}string list]] is returned with the default value of ',' is used.
* If the delimiter is not specified then a [[Macros:string list{{!}}string list]] is returned with the default value of ',' is used.
Line 8: Line 9:
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: indexes = getMacroIndexes(label)]
getMacroIndexes(label)
[h: indexes = getMacroIndexes(label, delim)]
</source>
<source lang="mtmacro" line>
getMacroIndexes(label, delim)
</source>
</source>
delim is the delimiter used to separate values in the [[Macros:string list{{!}}string list]] and defaults to "," if not specified.
delim is the delimiter used to separate values in the [[Macros:string list{{!}}string list]] and defaults to "," if not specified.

Revision as of 13:02, 10 March 2009

getMacroIndexes() Function

Introduced in version 1.3b48
Returns a list of the macro buttons on the Current Token that have the specified label. The type of the value returned depends on the delimiter parameter.
  • If the delimiter is not specified then a string list is returned with the default value of ',' is used.
  • If the delimiter "json" then a json array is returned.
  • Otherwise a string list is returned with the delimiter passed in.

Usage

getMacroIndexes(label)
getMacroIndexes(label, delim)

delim is the delimiter used to separate values in the string list and defaults to "," if not specified.


Version Changes

  • 1.3b49 - Added "json" delimiter option.