Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this section, you can find the method of writing a script using functions and subroutines[1]. When you write a script, please be aware of the following precautions.

...

  • Subroutine for the script execution

Subroutine

Command

RunScript(“Script Name”)

Script

RunScript “Script Name”

Description

Executes the assigned script.

Example

Runs the script named ‘ValueChange’.

RunScript(“ValueChange”)

Subroutine

Command

RunScriptEx(“Script Name”, Option, Parameter)

Script

RunScriptEx “Script Name”, Option, Parameter

Description

Executes the assigned script according to the option and parameter.

Option

0

No action is taken if the assigned script is currently running.

1

Waits until the script stops and runs the script with Parameter.

Parameter

A parameter conveyed to the script. The script can receive the parameter using GetParameter() function.

Example

Convey the parameter ‘Test’ to the script and executes the script named ‘ValueChange’.

RunScriptEx(“ValueChange”, 1, Test)

  • Subroutine to stop the script

Subroutine

Command

StopScript(“ValueChange”)

Script

StopScript “ValueChange

Description

Stops the assigned script.

Example

Stops the script named ‘ValueChange’.

StopScript(“ValueChange”)