Product icon Help book icon Video Mill : User's Guide

Script Samples

About The Samples

These samples are intended to show possible usage scenarios with Scripts. With the flexibility of Scripts, there will often be alternate approaches to achieve the desired results.

Three Video Playlist that Includes a Static Image Media Item


You want to start by a showing with a short film. Follow that with a promotional static image screen which includes a 10 minute count-down marquee timer. Then play the main feature.


Set up one Script to sequentially Play, then Unload each of the three Media Screens.

In the case of the Pre-Show Promotional Marquee, that could be as simple as a static image (jpg, png, etc) listing coming attractions. See the Rules of Script Execution for the special case of "Playing Media Items Which Are Static Images". You can also add a Marquee timer that counts down the minutes until show time.

Listing 1. Evening Show
Script: Evening Show
Total Time: 02:07:00
Description: Play 11 min short feature. Show Promo Marquee (10 mins). Start main feature.

1. Play (Space Shuttle Short)
2. UnLoad (Space Shuttle Short)
3. Play (Pre-Show Marquee)
4. UnLoad (Pre-Show Marquee)
5. Play (The African Queen 1080pHD)
6. UnLoad (The African Queen 1080pHD)

Play 3 Videos Simultaneously


You want to have 3 videos play simultaneously. Each Media Screen should close once its video completes playing.


Use Offset Timed Load Steps to play all videos immediately when the Script starts by using an offset time of zero (:00.0). In the Media Item Descriptors of each video, check the Unload when Media Ends checkbox. Use Location Override setting in each Media Item's Screen Dimensions to locate each screen on the display so that they do not block each other for viewing.

Listing 2. Play 3 Videos Simultaneously
Script: Play 3 Simultaneously
Total Time: 00:05:16
1. Play (Video1), Offset: :00.0
2. Play (Video2), Offset: :00.0
3. Play (Video3), Offset: :00.0

Play 3 Videos - Stagger Screen Visibilty


You want to have 3 videos play simultaneously (as in scenario above). But you only want one screen to be visible at a given time. And the visible screen should change every 5 seconds, from Video1 to Video2 to Video3.


You can run the sample Script above to start the three videos playing. Then run the Script in Listing 3, to change the screen visibility every 5 seconds. Set this Script to repeat as many times as needed based on the play Duration of Video1, Video2 and Video3.

Listing 3. Play 3 Videos - Stagger Screen Visibilty
Script: Stagger Visibity
Total Time: 00:00:15
Special Processing:
* Repeat: 5 times.
1. Screen Visible (Video1) = False
2. Screen Visible (Video2) = False
3. Screen Visible (Video3) = False
4. Screen Visible (Video1) = True
5. Delay (:05.0)
6. Screen Visible (Video1) = False
7. Screen Visible (Video2) = True
8. Delay (:05.0)
9. Screen Visible (Video2) = False
10. Screen Visible (Video3) = True
11. Delay (:05.0)

Using Scripts for Modular Tasks


You want to display two playlists of flyers on a large TV monitor in a store window. It will display two flyers side by side for 30 seconds then move to the next two flyers. Each flyer is a simple PNG images with some promotional or event message.


Create one Master Script (Listing 4) to start two other playlist Scripts. The playlist Scripts (Listing 5), will play each flyer sequentially.

Notes: The time duration that each flyer is displayed is set in Media Item Options> Default Durations. Positioning of the flyers is greatly simplified by using Basic Load Templates. In the Media Screen Dimensions panel, set the Media Item's Load Template to either the "Left Half" and "Right Half" Basic Style Template.

Listing 4. Master Starter Script.
Script: Master Starter
Description: Starts two scripts simultaneously.

1. Run Script (Right Side Flyers)
2. Run Script (Left Side Flyers)
Listing 5. Two Playlist Scripts.
Script: Right Side Flyers
Description: Plays the flyers on right side of display.

Special Processing:
* Loop continously.
1. Play (FlyerRight-A)
2. Play (FlyerRight-B)
3. Play (FlyerRight-C)
4. Play (FlyerRight-D)

Script: Left Side Flyers
Description: Plays the flyers on left side of display.

Special Processing:
* Loop continously.
1. Play (FlyerLeft-A)
2. Play (FlyerLeft-B)
3. Play (FlyerLeft-C)
4. Play (FlyerLeft-D)

Start an Exteral Program from a Script


You have an External Program that will turn on and control a DMX lighting array. It will accept a lighting sequence name as a command line argument. You want to start that Exteral Program and pass it a lighting sequence name. Then immediately Play a video.


Use a Start Exteral Program Step to start the DMX lighting program.

Listing 6. Starting an Exteral Program.
Script: Turn on DMX Lights, Play Video1
Total Time: 00:01:45
1. Start Ext.Program (DMX Lights), Var: IntroSequence
2. Play (Video1)

Pause and Resume a Video Every 5 Seconds


You want to Play a video but have it pause and resume every 5 seconds until it finishes playing.


Create two Scripts. One Script Plays the video (Listing 7). And after 5 seconds, it runs the second Script that will produce the pause/resume behavior.

The second Script (Listing 8), alternates between Pause and Resume using 5 second Delay steps to time the transition. The Script is set to loop continuously until it is stopped.

Listing 7. Starting an Exteral Program.
Script: Play Video1
Total Time: 00:01:45
1. Play (Video1)
2. Run Script (Pause and resume Video1), Offset: :05.0
Listing 8. Starting an Exteral Program.
Script: Pause and Resume Video1
Total Time: 00:00:10
Special Processing:
* Loop continuously.
1. Pause (Video1)
2. Delay (:05.0)
3. Resume (Video1)
4. Delay (:05.0)

Playing Multiple Playlist Scripts In Sequential Order


You want to play two playlists of videos on one display (it could be any number of playlists). Playlist-A should complete playing all its videos before Playlist-B starts playing. And you want to run these playlists in this manner continously throughout the day.


Create a Master Script (Listing 9) to run two other playlist Scripts. Step-1 starts Playlist-A. Step-2 will Wait On Playlist-A to complete all its videos. Then Playlist-B is started. In the Master Script's Special Processing controls, check the Loop continously checkmark. This modular approach allows you to quickly swap in/out other playlist and you can include as many playlists as desired.

The two playlist Scripts (Listing 10, Playlist-A and Playlist-B), will play each video sequentially. These can contain any number of videos and/or images.

For this scenario, the most efficient method is to use a Load Template because it will create one Media Screen and all videos will play via the one Screen. If you don't use a Load Template, each video will create its own Media Screen. In this case, you would need to follow each Play step with an Unload step to get rid of each Screen after the video play completes.

Listing 9. Master Starter Script
Script: Master Playlist
Special Processing:
* Loop continously.
1. Run Script (Playlist-A)
2. Wait On Script (Playlist-A)
3. Run Script (Playlist-B)
4. Wait On Script (Playlist-B)
Listing 10. Two Playlist Scripts
Script: Playlist-A
Description: Plays four videos in sequential order.
1. Play (Video-A)
2. Play (Video-B)
3. Play (Video-C)
4. Play (Video-D)

Script: Playlist-B
Description: Plays four videos in sequential order.
1. Play (Video-E)
2. Play (Video-F)
3. Play (Video-G)
4. Play (Video-H)

Close Of Business Clean Up


You have a Playlist that loops continuously and possibly other scripts that run in a complex sequence. At close of business time, you want to immediately end all script processing and close any open Media Screens.


Create a Clean Up Script (Listing 11) and schedule the script to run a minute prior to closing time.

Two steps will do end of processing clean up. "Unload All Screens" will close any open Media Screens. "Halt All Scripts" will end any scripts that may be running. When using these step commands together, make sure to do them in the order shown because "Halt All Scripts" really does means ALL, including the script it is contained in. If "Unload All Screens" comes AFTER "Halt All Scripts", the step will never execute.

Listing 11. End Of Day Clean Up Script
Script: End Of Day Clean Up
1. Unload All Screens
2. Halt All Scripts