Locator: Automator >
Edit Script > Edit Script
The Script summary is displayed on the right inside the
group box. Set Script values using the
controls as follows:.
Name - The Script name. A short, descriptive name is best.
Id - The Script numeric Identifier (Id). Used to uniquely identify the Script
Description - A verbose description of what the Script does and any special instructions for the sound person. Click the Edit Description button for a multi-line editor.
Add or Edit Automation Steps
In addition to editing individual Steps with the Step Editor, there are productivity buttons to change certian Step properties on multiple Steps at a time with just a few clicks.
Edit Steps button - Pops up a list of existing Steps. You can select and Edit a step with the Step Editor. Also Reorder Step positions, and Delete Steps.
Add Selected Step button - First pick a
to Add from the Step Type list. Then click the
Add a Step
button. Some Step types will pop up a multi-selection list of items to choose from. Steps are added to the end of the Script. You can re-order Steps with the
button. 'Play, 'Run Script' and 'Start Ext-Program' Steps will pop up a multi-selection list
for the reference target item(s) (Sound Items, Scripts or External Programs) that you want the step to act on.
Schedule Steps button - Sets the Schedule of one or multiple Steps from the Favorite Schedule. You are prompted to select the Steps to apply the change to.
Delete Schedules - Deletes the Schedule of one or multiple Steps. You are prompted to select the Steps to apply the change to.
Set Steps Offset Times button - Sets the Offset Times of one or multiple Steps. You are prompted for: Enable/Disable of the Offset Time; Time amount of the Offset Times ; and a selection the Steps to apply the change to.
Steps Output Group Override button - Sets the Output Group Override of one or multiple Steps. You are prompted for: Enable/Disable of the Override; Index of the Override Output Group; and a selection the Steps to apply the change to.
Automation Steps can be any of the following types:
Affect of Pause on Delay Times
Play - Plays a Sound Item.
Delay - Adds a time delay time between two sequential Steps.
Run Script - Runs another Script. The script can run inside the parent scripts thread or it can spawn a new, separate thread. (See Run Script - Spawns New Thread for details.)
Stop Script - Stops a Script that is currently running. If the target Script was started internally by a Run-Script Step in the parent Script, it will also be stopped.
Pause Script - Pauses a Script that is currently running. If a Script pauses itself with a Pause Script Step, it will effectively freeze itself (since no steps will execute while it is paused). Thus it won't be able to resume itself.
Resume Script - Resumes a Script that is currently Paused.
Start External Program - Starts an External Program and passes any variables (parameters) specified in the Step.
When the Start External Program Step executes in automation, the
does not wait for the external program to complete its operation. It starts the External Program then goes on to execute the next automation Step immediately.
Clear Announcements - Removes any announcements currently in the announcements stack. For example, you may want to stop repeating announcements at a certian time of day.
Scheduler - Start, Stop, Pause or Resume the Scheduler. Warning: If a script running under the Scheduler executes a Scheduler(Pause) step, then the Scheduler will be effectively frozen -- nothing gets executed in the Scheduler while it is paused, not even timed steps. You will have to resume it manually by button click or have an external script execute a Scheduler(Resume) step.
If you click Pause while a Delay Step is in effect, the delay time will suspend (stop draining) until Resume is clicked. So for example, consider a 20 second Delay. If you click Pause after 5 seconds of the delay has expired, there will be 15 seconds of delay remaining once you click Resume.
Preemptive Play Steps
A Preemptive Play Step (a Step that plays a Preemptive Sound Item) added as a sequential Step is NOT allowed. The Step must be a timed step (Timed Offset step or Scheduled step). If it is not timed, it will be executed by the Automator as a sequential play step (but not preemptive). This condition will force a warning message from Script Validation and the Script Editor. There is actually no logical reason to configure a step this way.
Process as Announcements
Loop continously - The Script will run continously until it is stopped by pressing the Stop button or by some other stop method. Loop behaves just like Repeat except there is no end to the repeating. Repeat after Offset Time also works with this setting.
Repeat - Specifies how many times a Script should run when it is started (1 = run one time only, 2 = run 2 times, etc.). After the last Step finishes, the Script restarts at the first Step.
Repeat after Offset Time - When checked, the Script runs will repeat after the Offset Time has expired. For example, if Offset Time is 5 minutes, the Script will run every 5 minutes for the specified number of Repeats. The first run occurs immediately when the Script run is started. Useful when you want to time the repeat of a Script.
Shuffle Steps when run - When checked, the Script Steps are randomly shuffled when the Script is run. Useful for music play.
When any of these are checked, all Play Steps in the containing Script are treated as Announcements. See the separate Announcements page for full details.
Standard Announcements - Standard Announcements. Announcement Play Steps can be either Offset Timed or Scheduled.
Insert Announcements - Insert Announcements. These announcements are inserted after sequential Play Steps finish playing. This provides a mechanism to play announcements automatically in between tracks of music programming. You can set the Insert Frequency so that an announcement plays after every music track; after every two music tracks; every three, and so on.
Interval Announcements - Interval Announcements. Announcements are played after the specified Interval expires (ex. every 3 minutes). This provides a mechanism to play announcements automatically at regular intervals. Set the Interval Duration to any desired amount of time.
Date/Time Scheduling a Script
See Figure 2.
Only Scripts that have their Schedule Enabled will be added to the Schedule Plan when the Scheduler is started.
Schedule Enable - Enables the scheduling of a Script to Run at the specified Current Schedule. This must be checked for the Script to be added to the Schedule Plan.
Schedule Time picker sets the Time of Day to run the Script. This sets a point in time. If you want to set a time range, use the schedule
Set to Now button - Set the Schedule Time to current time (a point in time).
Schedule Edit button - Allows for setting advanced Schedule time range and/or date criteria using the Schedule Editor.
Anytime 24/7 - Set the Script's Schedule to start the Script Anytime you start the Scheduler (regardless of Time Of Day). This is a quick set button and sets the Schedule to Time Period = 24-Hours.
Current - This is the Script's Current effective Schedule.
Figure 2. Schedule Section controls
When you run a script by clicking the Automator Run button, a thread is created for script execution. If the script has Run Script steps (as in Listing 1), the scripts will run inside the parent script's thread. In this case, the master script thread can control both of the spawned scripts and coordinate the announcements with the music playlist.
There are cases when you might want to spawn a script into its own separate thread. In that case, you would mark a Run Script step with the Spawns New Thread attribute. Each thread would run concurrent (simultaneously) with other threads. This necessary for advanced scripting like when you want to pause and resume a script on a timed basis.
Listing 1. Master Script
Script Name: Pre-show Music Master
1. Run Script (My-Announcements)
2. Run Script (My-Playlist)
Figure 3. Scripts Threads
1) If you delete a Sound Item from the Sound List and an automation Step references to that Sound Item, the automation Step will not execute. It will also be flagged as an error when you Validate the Script.
2) A Run Script Step cannot run the Script it is contained in. This will be flagged as a 'self reference' error. For example, Script A cannot contain a Step to Run Script A. This would create an infinite loop condition.
3) It is possible to create an infinite loop if you are not careful with Run Script Steps. For example, if Script A contains a Step to Run Script B; and Script B contains a Step to Run Script A. In this case, A and B will run each other infinitely and if not stopped with the Stop button will eventually cause the program to run out of memory.