It is possible to assign scripts to a normal XMLSpy project.
The assigned scripts will be loaded each time XMLSpy opens the project. The scripting project is closed when XMLSpy closes its project.
To assign and unassign scripts to a project, use the menu items from the "Project" submenu of the "Tools" menu. These menu items are not active if there is no currently active XMLSpy project.
To assign a script, select the "Assign Scripts to Project" menu item. A standard file dialog appears enabling you to choose the scripting project file. The scripts are loaded and you are able to edit them if you switch to the scripting environment.
If you want to see the path of a scripting project after you have assigned it, select "Project Information" from the "Project" menu of the XMLSpyFormEditor.
To unassign the current scripts from the project select "Unassign Scripts from Project". XMLSpyFormEditor closes the scripting project immediately.
It is possible to temporarily deactivate the project scripts with the "Project Scripts active" menu item. The associated scripting project file will not be unassigned.
Any forms, macros and events which are defined in the project scripts, "override" any existing definitions from the global scripts.
Example:
If the event handler for On_BeginEditing() exists in the project and global scripts, and XMLSpy raises this event, the event handler from the project scripts will be called.
You have to remove the predefined (but empty) event handlers from the project scripts manually, if you want the event handlers from the global scripts to get called. This is also true for the ShowForm() method of the Application object, to show a form and the AddMacroMenuItem() method to add a macro to the "Tools" menu.
Previous
Top
Next