execLink: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: {{MacroFunction |name=execLink |version=1.3b55 |trusted=true |description= Executes a macro link that was created with {{func|macroLinkText}}, output generated by the link is sent to playe...)
 
m (Made note about how deferred links are queued.)
Line 4: Line 4:
|trusted=true
|trusted=true
|description=
|description=
Executes a macro link that was created with {{func|macroLinkText}}, output generated by the link is sent to players using the standard {{func|macroLinkText}} logic. {{func|execLink}} allows you to defer the running of the link until after the currently running macro has ended in which case the output will be displayed after any output generated by the current macro. If the execution of the link is not defered then any output generated will appear ''before'' any output generated by the current macro.  
Executes a macro link that was created with {{func|macroLinkText}}, output generated by the link is sent to players using the standard {{func|macroLinkText}} logic. {{func|execLink}} allows you to defer the running of the link until after the currently running macro has ended in which case the output will be displayed after any output generated by the current macro. If you defer a series of links, they will be queued in order and executed after the currently running macro. There is no software limit to the amount of links you can queue, but your hardware will impose its own limitations. If the execution of the link is not defered then any output generated will appear ''before'' any output generated by the current macro.  


You can use this function to update values in a token copied with {{func|copyToken}} using the defered option. You can also use this function to send output selectivly to a list of players from the current macro, or to generate output that is not suppressed when the {{func|abort}} function is called.
You can use this function to update values in a token copied with {{func|copyToken}} using the defered option. You can also use this function to send output selectivly to a list of players from the current macro, or to generate output that is not suppressed when the {{func|abort}} function is called.

Revision as of 23:55, 15 April 2009

execLink() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b55
Executes a macro link that was created with macroLinkText(), output generated by the link is sent to players using the standard macroLinkText() logic. execLink() allows you to defer the running of the link until after the currently running macro has ended in which case the output will be displayed after any output generated by the current macro. If you defer a series of links, they will be queued in order and executed after the currently running macro. There is no software limit to the amount of links you can queue, but your hardware will impose its own limitations. If the execution of the link is not defered then any output generated will appear before any output generated by the current macro. You can use this function to update values in a token copied with copyToken() using the defered option. You can also use this function to send output selectivly to a list of players from the current macro, or to generate output that is not suppressed when the abort() function is called.

Usage

execLink(link)
execLink(link, defer)

Parameters

  • link - The link to "execute".
  • defer - Executes the link after the current macro has completed if non zero, defaults to zero.

Examples

Execute a macro link immediatly (any output wil appear before the current macros output)
[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)]

See Also