Script Actions: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
{{Stamp|2017-02-25|4.3.0|1.1.0}}
{{Stamp|2017-02-25|4.3.0|1.1.0}}
coming soon
 
To initiate a script action, use the toolbar button on the libraries list screen or the toolbar on the entry edit card.
 
A script action is a specialized trigger which is initiated by the pressing of a button and executed in the background mode. Functions and objects that are available for triggers are available for script actions. Script actions use the same security parameters as trigger scripts.
 
== Creating a script action ==
Each library can have multiple script actions. To see a script of a specific library, open Library > Menu > Scripts. To create a script action:
# Open the list of scripts, click the +, and select Actions.
# Select the place of script (context); it can be library or entry.<br/>Adding a script action on the toolbar of the library or entry card will make the button appear.
 
== Arguments (parameters) ==
The script can have arguments, the values of which will be entered by the user.
 
To create arguments:
# Open the script edit card, move to tab arguments, and click +.
# To get the values of the arguments, use function arg(argumetn name). The type of the result depends on the type of the arument, and is similar to the field() function for an entry.
 
== Functions and objects available for the script ==
Script actions can use the same objects and functions as trigger scripts. If the script is in the Entry context, then it can use function entry() to get the current entry.

Navigation menu