Qlab 5 Script to create a cue with pre-wait time

181 views
Skip to first unread message

Andy James

unread,
Sep 1, 2023, 11:06:56 AM9/1/23
to QLab
Hi All,

Looking for some help with a script I am trying to create.

I want to be able to set the playhead(?) on an audio track to a relevant position and press a shortcut key to create a new cue to trigger an ETC eos cue. I provide the cue number in a dialogue box, and the cue should have its pre-wait time set to the current time of the playhead in the audio cue.

I have my Eos cue creator script working great, but cannot work out how to set the pre-wait time from the currently paused audio cue. Any help gratefully received!

display dialog "Create Cue to fire EOS cue number" & return & return & "Enter cue number:" default answer "" buttons {"Cancel", "OK"} default button "OK"
if button returned of result is not "Cancel" then
set cNumber to (text returned of the result) as number
end if
display dialog "How many sequential cues?" default answer "1" buttons {"Cancel", "OK"} default button "OK"
if button returned of result is not "Cancel" then
set cAmount to (text returned of the result) as number
end if
tell application id "com.figure53.QLab.5" to tell front workspace


repeat with i from 1 to cAmount
set nextCue to cNumber + (i - 1) as number
set newCueNumber to "L" & nextCue
set newCueName to "Lights " & nextCue
make type "Network"
set networkCue to last item of (selected as list)
set properties of networkCue to {q number:newCueNumber, q name:newCueName, network patch number:1}
set parameter values of networkCue to {"no", "cue", "fire", nextCue}
end repeat

end tell

Thanks,
Andy 

James Lo

unread,
Sep 1, 2023, 12:58:59 PM9/1/23
to QLab
Maybe like this?

tell application id "com.figure53.QLab.5" to tell front workspace

set theRunningCue to item 1 of (active cues as list)

set elapsedSeconds to action elapsed of theRunningCue

repeat with eachCue in (selected as list)

set the pre wait of eachCue to elapsedSeconds

end repeat

end tell

Screen Shot 2023-09-01 at 12.56.42 PM.png

Andy James

unread,
Sep 1, 2023, 1:21:27 PM9/1/23
to QLab
Great, thanks James. This has given me enough to make it work for me.

My adapted code below in case it is of use to anyone. Sorry I don't know how to get it to format correctly!

display dialog "Create Cue to fire EOS cue number" & return & return & "Enter cue number:" default answer "" buttons {"Cancel", "OK"} default button "OK"
if button returned of result is not "Cancel" then
set cNumber to (text returned of the result) as number
end if

tell application id "com.figure53.QLab.5" to tell front workspace
set theRunningCue to item 1 of (active cues as list)
set elapsedSeconds to action elapsed of theRunningCue
set nextCue to cNumber as number

set newCueNumber to "L" & nextCue
set newCueName to "Lights " & nextCue
make type "Network"
set networkCue to last item of (selected as list)
set properties of networkCue to {q number:newCueNumber, q name:newCueName, network patch number:1}
set parameter values of networkCue to {"no", "cue", "fire", nextCue}
set the pre wait of networkCue to elapsedSeconds
end tell  


Andy

James Lo

unread,
Sep 1, 2023, 6:25:02 PM9/1/23
to QLab
RE formatting for this forum, I learned how about 48 hours ago from micpool  :)
Reply all
Reply to author
Forward
0 new messages