GoTo Cue scripts not working

162 views
Skip to first unread message

Christopher Pyfrom

unread,
Jul 3, 2018, 5:41:03 PM7/3/18
to QLab
Hello All,

I've been trying to create an Apple Script to have a "GoTo Q" with a dialog box to be able to enter the desired cue number (just like on an eos lighting console).

Here are a few of the scripts I've been trying but nothing has worked so far.

Script 1:
The script below I was trying to use to set the desired target of a QLab GoTo Cue placed on the Main Cue List.  The q number of the GoTo Cue is "GoToQ".  The script below was in a second Cue List.  It kept giving an error of: "ERROR: Can't get cue whose name = "GoToQ". (-1728)"

tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "Go to cue:" default answer "0" with title "GoTo Q" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"
set qnumber to text returned of result
set theCue to cue whose q number is "GoToQ"
set cue target of theCue to qnumber
end tell



Script 2:
The script below was placed in the Main Cue List with the other cues I was trying to "GoTo".  I was trying to just simply change the playback position.  When the dialog box would come up I would enter the number 2 (to try to GoTo Cue 2).  It kept giving me: "ERROR: Can't get cue whose name = "2". (-1728)"

tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "Go to cue:" default answer "0" with title "GoTo Q" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"
set destinationCueNo to (text returned of result as string)
tell workspace 1
set destinationCue to cue whose q number is destinationCueNo
set playback position to destinationCue
end tell


What am I missing?

Thanks,

Chris Pyfrom

Steve Swift

unread,
Jul 3, 2018, 5:59:27 PM7/3/18
to ql...@googlegroups.com
You don’t need to use “whose q number is” to reference a cue. You can refer to the cue by it’s ID or number:

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

display dialog "Go to cue:" default answer "0" with title "GoTo Q" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"

set qnumber to text returned of result

set cue target of cue "GoToQ" to cue qnumber

end tell


With regards to playback position, that is a property of the cue list, not the workspace, so you need to specify the cue list when setting playback position:

tell application id "com.figure53.QLab.4"

display dialog "Go to cue:" default answer "0" with title "GoTo Q" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"

set destinationCueNo to (text returned of result as string)

set destinationCue to cue destinationCueNo of front workspace

set cueList to q list name of destinationCue

set playback position of cue list cueList of front workspace to destinationCue

end tell


Best,
Steve


--
Contact support anytime: sup...@figure53.com
Follow Figure 53 on Twitter: https://twitter.com/Figure53
User Group Code of Conduct: https://figure53.com/help/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/a076abef-bd35-4c5b-aa5c-783fb20597c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Pyfrom

unread,
Jul 3, 2018, 10:09:32 PM7/3/18
to QLab
Thanks Steve,

The first one worked great.   The second one kept returning error messages saying that it couldn't locate the cue list and the cue list name it had was the name of one of my cues.  I figured it out though.  q list name is refers to the name of a cue in a cue list.  Not the name of the cue list. But this info put me on the right track.  Here is the script that worked:

tell application id "com.figure53.QLab.4"
display dialog "Go to cue:" default answer "0" with title "GoTo Q" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"
set destinationCueNo to (text returned of result as string)
set destinationCue to cue destinationCueNo of front workspace
set playback position of cue list 1 of front workspace to destinationCue
end tell

It works as long as the show cue list is the 1st cue list.

as for the first method of setting a GoTo cue, here is the final script.  In order for it to work there has to be a Cue with a q type of GoTo with a q number of "GoToQ" already created.  It simply changes the target of that cue and then starts the cue.

tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "Go to cue:" default answer "0" with title "GoTo Q" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"
set qnumber to (text returned of result as string)
set cue target of cue "GoToQ" to cue qnumber
try
start cue "GoToQ"
end try
end tell

Thanks again Steve!
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages