Import Scripts into a Library

To add scripts to a library, you must import them from .js files or .zip archives.

The .js and .zip files can be obtained by exporting from the Script Editor tab in Application View, or they can be produced using external editors and tools.

The scripts are hashed at the time of import to protect against subsequent modification (tampering).

 

Be careful when importing scripts

To avoid unintended side effects or conflicts during the scripts execution, before importing scripts into a library or project, it is recommended to check the scripts already present in the system.

Additionally, to help save system resources, it is recommended to avoid importing unnecessary or wrong scripts.

  1. Select the scripts block of the library.
    For example: Project > System Settings > Libraries > L4-Project > […] > [scripting library] > [scripts block].
  1. Select the Script Editor tab.
  1. Click Import .
  1. In the File Open dialog box, locate and select the files (.js or .zip) containing the scripts you want to import.
    You can make a multiple selection.
  1. Click OK.
  1. During the import, if any script is already present in the script library, a message displays and asks what to do:
  • Click Yes to overwrite the script.
    In case linked objects are present, another message box displays: click Yes if you want to delete these linked objects.
  • Click No to not import the script.
  • When the import is complete, the imported scripts are added to the list in the Scripts expander.
    If an imported script had a comment in the first line (such as, a line starting with "//" or a text between "/*" and "*/"), this text displays in the Description column.
    The imported scripts are included in the project backup. They can be later exported (to a GMS file) with any other Desigo CC libraries data.
    NOTE: In the file system, the.js files of the imported scripts are stored in the corresponding libraries folder.
    For example, under MyProject > libraries > Global_Scripting_Project_1 > Scripts.