A Cue List A Day

[Updated for QLab 4.1 13 JUL 17]

When this workspace opens, it lets you select a cue list from a choice of 8. In this example, there is a cue list named for each day of the week, and an extra one for Saturday for afternoon use. It’s easily adapted for other uses, so for instance, you could have 21 choices; morning, afternoon, and evening, for each day, or just a choice of cue list for matinée or evening performances.

It also defaults to a choice called “Auto”. Selecting this default by just hitting return or, clicking OK will read the system clock and go to the appropriate cue list automatically.

Here it is in action:

How It Works:

This workspace demonstrates a few QLab features including:

Auto-running a cue when a workspace opens.

Interacting with the operator through dialogs.

Automating workspaces by using the system clock.

To make a cue autorun when a workspace is launched, go to settings, general, and enter the number of the cue you want to run.

Workspace open start cue

In the example, the cue numbered SEL, is tucked away in a cue list called Scripts.

Days Script and prewait

There are a few important things to note. The ‘run in separate process’ box, in the bottom right of the script tab of the inspector, is not checked. And there is a 1-second pre-wait on the script cue. Because the script is the first thing to happen when the workspace is opened, it doesn’t yet know it is the front workspace. The 1-second pre-wait just makes sure it becomes the active workspace before the script is run.

This is the script that is autorun:

–setup list of performances
set myCueLists to {“Auto”, “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday mat”, “Saturday eve”}
–get day of week and hours of time from system clock
tell application “System Events”
set thedate to (current date)
set theday to weekday of thedate
set thehour to (hours) of thedate
end tell
tell application id “com.figure53.qlab.3” to tell front workspace
–select performance or Auto Mode
set selectedCueList to (choose from list myCueLists with title “Show Selector” with prompt “Select which show is today?” default items “Auto”)
if selectedCueList is {“Auto”} then
–select appropriate cuelist by day
if theday is Saturday then
–select appropriate saturday cuelist by time
if thehour > 17 then
set userCueList to “Saturday Eve”
set userCueList to “Saturday Mat”
end if
else if theday is Friday then
set userCueList to “Friday”
else if theday is Thursday then
set userCueList to “Thursday”
else if theday is Wednesday then
set userCueList to “Wednesday”
else if theday is Tuesday then
set userCueList to “Tuesday”
else if theday is Monday then
set userCueList to “Monday”
else if theday is Sunday then
set userCueList to “Sunday”
end if
set userCueList to selectedCueList
end if
–test for cancel button
if userCueList is false then
set current cue list to first cue list whose q name is userCueList
end if
end tell

The script first creates a list of performances. It then gets the date from the Mac system clock  and extracts the weekday and the hour of the time.

It then presents a dialog, with all the cue lists available, for the operator to choose from. If the operator selects Auto, which is the default, the weekday and hour are used to determine which cue list is the appropriate one to open.

The script also contains some code in the event the cancel button is pressed.

You can download the workspace here.


Chapter Author: Mic Pool

Chapter Image: George Armstrong,
[Public domain], via Wikimedia Commons