Status: Validated

Script Management

Add a New Script

To add a new script, right-click outside any node of the Script Tree and select the 'Add a new Script' command.
The following dialog lets you enter:

  • The script file name,
  • The script name that will be displayed in Studio,
  • The script comments.

Click the 'Ok' button to validate your entries.

The new script file is physically created in the 'local' subdirectory of the project (see Project Structure and Organization).

Notes:

  • To enable Breakpoints to be inserted in the new script, it MUST have a unique name,
  • If an existing script file name is used , the corresponding script is included in the project.
    The file content remains unchanged,
  • By default, each new script is included in the GLOBAL Process.
    If you wish to include a new script in another application, right-click the application node in the Project Tree and select the 'Add a new Script' command.
    This is required for backwards compatibility; there is no particular advantage in including a script in an application rather than in the GLOBAL Process.


Edit a Script

To edit a script, double-click its node in the Script Tree.
If the script is already opened in a Code Editor instance, this instance is brought to the front.
Otherwise, a new Code Editor instance is opened with the selected script in Editing mode.

Double-clicking a MapItem node of the script (such as Function or Scenario):

  • Opens the script in Editing mode,
  • Automatically navigates within the script to select and display the corresponding code block.

Notes:

  • Editing a Framework or Library script requires special rights.
    These special scripts are in read-only mode.


Move a Script in a Folder

To add a script to a new folder, right-click the script node in the Script Tree and select the 'Create Folder' command.
Desktop Studio creates a 'new folder' and moves the selected script to it.

You can rename the folder by selecting its node and hitting the F2 key.
Enter the new folder name, and hit Enter.

To move a script into an existing folder, simply drag & drop it onto the folder node in the Script Tree.
To move a script out of its containing folder, simply drag & drop it out of the folder node in the Script Tree.

Notes:

  • It is impossible to move a folder in another folder: Desktop Studio only manages single-level folders,
  • The folder is not physically created on the disk: it is only a 'logical' folder.


Rename a Script

You can rename a script by selecting its node in the Script Tree and hitting the F2 key.
Enter the new script name, and hit Enter.

Notes:

  • The action of changing the name only modifies the logical name in Desktop Studio. The name of the physical file containing the script is not affected by this operation.
    ====Exclude a Script====

    A Script can be temporary excluded from compilation and execution.

    To exclude a script, right-click the script node in the Script Tree and select the 'Exclude Script' command.
    After confirmation, the script file is excluded from the project.


    ====Delete a Script====

    To delete a script, right-click the script node in the Script Tree and select the 'Delete Script' command.
    After confirmation, the Script file is removed from the project.

    Notes:

    • Deleting a script doesn't delete the script file on the disk.


    ====Edit the XML List of Scripts====

    If necessary (not recommended), it is possible to directly edit the XML code describing the list of scripts.

    To do this, double-click the 'SCRIPTS' node of the GLOBAL Process in the Project Tree.
    The corresponding XML code opens in a new Code Editor instance:

    You can then edit the XML and save it.
    The Script Tree will be refreshed to reflect the modifications.

    Notes:

    • Please note: if this XML code remains open, it will not be synchronized with further modifications made in the Project Tree.
      So, to avoid losing modifications, please close it as quickly as possible.