KB-133308: The scripting package

The scripting package

The file extension for scripts is *.script. SCRIPT files contain structured text and simple commands in scripting language. The content of the files can be analyzed and executed by the interpreter included in the script package.

Executing scripts with the script interpreter

  1. A script event is triggered
  2. The associated script interface is generated
  3. An interface file with information about the affected component is created.
  4. The interpreter starts and checks whether this component type for this script event is attached to a script. The interpreter searches for a file with the name<ComponentTypeID>.script – If these two conditions do not apply then versiondog will check “<Script event>.ini” whether there is a standard script for this scripting event !!! note The SCRIPT file and the interpreter (EXE) (as well as the INI file used to assign component types to scripts) need to be present in the versiondog script management. – If this is not available, a check is made to see if a script is assigned to the component type in the <script event>.ini file.

  5. If a script is found, the interpreter analyzes the contained instructions and executes them. If not script is found, versiondog will carry out the standard action of the system


Example

A RSLogix 5000 project is selected and the user clicks on F4 to open the editor. The component type ID of the RSLogix component is DC14F6773F0B4705886A3457646C92B6. The BeforeEdit.ini file is shown below:
[General]
Default =
DC14F6773F0B4705886A3457646C92B6 = RSLogix5000_OldEditor

calls up the script interface BeforeEdit.
The script interface creates the  interface file and starts the interpreter.
The interpreter checks whether there is a script for the component type ID.
The component type ID is assigned the script RSLogix5000_OldEditor.script.
The interpreter parses the instructions in the SCRIPT file and executes them.
After the script is finished, the operation is executed taking into account the return values of the script.

Last update: September 15, 2023

Related Articles

IMPRINT | PRIVACY POLICY | COOKIE POLICY

Privacy Preference Center