Change duration time by using AppleScript

46 views
Skip to first unread message

Tommy

unread,
Mar 8, 2023, 2:59:03 AM3/8/23
to QLab
Is it possible to use display dialog in a AppleScript, and specify any cue number, and change Duration time? (or Opacity, Scale, etc.)

micpool

unread,
Mar 8, 2023, 5:11:36 AM3/8/23
to QLab
tell application id "com.figure53.QLab.5" to tell front workspace
try
set theCue to cue (text returned of (display dialog "Cue Number?" default answer ""))
set the duration of theCue to 24
on error
display dialog "The cue doesn't exist!"
end try
end tell

But this would be a fairly unusual way of doing things, as it would seem to require you to have committed all the cue numbers  in a workspace,  and what they do to (brain) memory for it to be useful.


What exactly  are you trying to achieve with a script , that would  be quicker than just editing the cue?


Mic

Tommy

unread,
Mar 8, 2023, 6:10:11 AM3/8/23
to QLab
Thank you, micpool!

If I have over 3000 video/audio/fade cues in one workspace, and I have all the cue numbers written down in my theatrical performance script, I usually scroll up/down to find the cue I want, but it would be nice if there was a way to type in the cue number (e.g. 1927), and then modify that fade time to any number (3 or 6.5 or...) in the fewest steps.
I envision the speed of modification by the lighting console. Of course, a keyboard shortcut or something like that would be fine.

2023年3月8日水曜日 19:11:36 UTC+9 micpool:

harry.jame...@gmail.com

unread,
Mar 8, 2023, 6:21:54 AM3/8/23
to QLab
You could also do this without adding an additional script dependency by using built-in hotkeys: 

'⌘J' displays a dialog to select a cue number
'd' focuses the "duration" input

so:

⌘J -> type cue number -> d -> type new duration 

would achieve the same thing.

Just a note that you can't directly set the duration of an audio/video cue via the 'd' key or via Mic's suggested AppleScript method, as its duration is dictated by the start/end times set in the "TIme & Loops" tab of the inspector.
This means that if you have audio cues you need to change the 'duration' of, you'd need a different AppleScript approach (and perhaps some more logic)

Thanks,

Harry

Tommy

unread,
Mar 8, 2023, 6:41:17 AM3/8/23
to QLab
Hi, Harry

The way you taught me to do that is so simple and smart!
Assigning them to Stream Deck is going to make it easier and quicker for everyone.

Thanks!
2023年3月8日水曜日 20:21:54 UTC+9 harry.jame...@gmail.com:
Reply all
Reply to author
Forward
0 new messages