Understanding the Use of Multiple Event Scripts |
Single line expressions and regular multi-line scripts are executed only at those times during your print job that
When the Type of Visual Basic Script for a data source is set to Event Control Scripts, the Event List option showing numerous script types appears to the left of the Script edit box. For any object on a template, you can define scripts for any or all of the events in the event list.
Each line item in the event list corresponds to a separate script. When you want to write a script for a given event, simply click on that item in the Event List. This will cause the script associated with the previously highlighted item to no longer be displayed in the Script edit box and the script associated with the newly highlighted event to be displayed instead. (Notice that, other than one or two lines of comment at the top, all of the scripts except for the OnAutoSelectedEvent start out completely blank.) You can now insert whatever lines of Visual Basic Script you desire into the Script edit box. (Don’t forget that to assign a value to a data source, a line of script beginning with "Value =" needs to appear somewhere in the script.) You can click on as many different items in the event list as you want and define a script for each one.
Functions and Sub[routine]s. This isn’t really an event all. When you select this option as the "event" before opening the Script Assistant, then the edit box in the Script Assistant will serve as a container in which you write one or more independent Visual Basic routines which can then be called and used by other scripts that are associated with real events. For more information, see Two Special Event Scripts.
OnAutoSelectedEvent. This isn’t really an event all. Selecting this as the "event" for your script simply means that you will allow
The Regular Event Scripts. The remainder of the event list corresponds to specific events. For more information, see Regular Event Scripts.