After you have finished the script, all you need to do is to decide in which event it will be executed.
Since this is an auxiliary code, which will only run once (considering it has already been tested, and is working properly), the script can be executed from a button on any screen. After this process is done, the button can be deleted.
Another possibility is to leave this and other auxiliary scripts on a specific screen that can only be accessed by the Administrator.
It is also possible to execute scripts at run time (in Studio), via CustomConfig method. You can create an auxiliary XControl or XObject specifically for running the script in this event. Likewise, the object can be deleted by the end of the process.
To learn more about CustomConfig event, we recommend reading the following article:
NOTE: The demo application below demonstrates all the concepts shown in this series of articles. The commands are created via scripts, and they are set up from a
“.csv” file.
Related articles
- Automation in code generation: Introduction.
- Automation in code generation: Lesson 1 – Working with vectors.
- Automation in code generation: Lesson 2 – Reading information from an Excel file.
- Automation in code generation: Lesson 3 – Changing a string into a vector.
- Automation in code generation: Lesson 4 – Scanning specific objects in a location.
- Automation in code generation: Lesson 5 – Adding objects via scripts.
- Automation in code generation: Lesson 6 – Checking for pre-existing objects.
- Automation in code generation: Lesson 7 – Events for script execution.