User Tools

Site Tools


en:code:core:script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:code:core:script [2011/04/20 20:42] – code:core:script renamed to en:code:core:script jmgren:code:core:script [2021/02/13 11:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Script ====== ====== Script ======
 Used to interact with the current script. This object is only available when executing a script, not when executing code using ActExec! Used to interact with the current script. This object is only available when executing a script, not when executing code using ActExec!
 +
 +===== Functions =====
 +
 +==== callProcedure ====
 +Calls a procedure from the script. The procedure will be executed when the current action is finished.
 +
 +<note tip>This function is not blocking : the code following a call to this function will be executed in any case</note>
 +
 +<note important>This function should be called only once per action, only the latest call will be taken into consideration otherwise</note>
 +
 +[//Added in Actionaz 3.8.0.//]
 +
 +=== Syntax ===
 +<code javascript>
 +Script.callProcedure(name);
 +</code>
 +
 +=== Arguments ===
 +  - name - (string) the name of the procedure to call
 +
 +=== Returns ===
 +  * (null) nothing
  
 ===== Variables ===== ===== Variables =====
Line 6: Line 28:
 ==== nextLine ==== ==== nextLine ====
 Contains the next script line to be executed. Contains the next script line to be executed.
 +
 +<note important>This property should be modified only once per action, only the latest modification will be taken into consideration otherwise</note>
  
 === Example === === Example ===
Line 15: Line 39:
 === Notes === === Notes ===
 This variable can be used as "goto". This variable can be used as "goto".
 +
 +==== line ====
 +Contains the current script line. Read-only. [//Added in Actionaz 3.7.0.//]
 +
 +=== Example ===
 +<code javascript>
 +Console.print("The current line is " + Script.line); //Show the current line
 +</code>
 +
en/code/core/script.1303332161.txt.gz · Last modified: 2021/02/13 11:23 (external edit)