Note: This function can only be used in a Trusted Macro
execLink(link) execLink(link, defer) execLink(link, defer, targets) execLink(link, defer, targets, delim)
link- The link to "execute".
defer- Executes the link after the current macro has completed if non zero, defaults to zero.
targets- are the user names (so not token names) but the names of the users that are logged in. The options "gm", "gm-self", "self", "not-self", "not-gm", "not-gm-self", "none", and "all" are also valid parameters to give. E.g.: "tim, tom, tarra". Defaults to self (so if no parameter is given the link is executed locally only). Here is a summary of the valid values:
- Player name: The named player.
- self: Self only (default, link is only executed locally).
- gm: GM only.
- gm-self: Both the GM and self.
- all: All connected players and GMs.
- not-self: Anyone but self.
- not-gm: All non-GMs.
- not-gm-self: All players apart from the GM and self.
- none: No players. No GMs.
delim- The delimiter used to separate the values in the String List that is given, defaults to
"json"is specified, a JSON array is expected instead of a String List.
[h: link = macroLinkText("Test@Lib:Test", "self")] [h: execLink(link)]
Execute a macro link after the execution of the current macro (any output will appear before the current macros output)
[h: link = macroLinkText("Test@Lib:Test", "self")] [h: execLink(link, 1)]
Copy a token and update its values.
[h: newToken = copyToken("Hero")] [h: link = macroLinkText("update@Lib:GM", "none", "", newToken)] [h: execLink(link)]
Execute a macro link on all clients
[h: link = macroLinkText("Test@Lib:Test", "none")] [h: execLink(link, 0, "all")]
- 1.5.5 - Added the
- 1.5.7 - Added "not-self", "not-gm" and "not-gm-self" as valid targets.
Deferred functions/links which are queued within a deferred macro do not run directly after the queuing macro, but instead is added to the end of the stack of all the deferred functions and links. This means you cannot 'nest' deferrals or insert deferrals in the middle of the stack of deferred macros. For discussion of this functionality and possible workarounds you can read more on GitHub.