HELP! - Set Cue Target with Script

162 views
Skip to first unread message

Benjamin Farrar

unread,
Mar 21, 2022, 12:34:44 PM3/21/22
to QLab
Hello,

I am trying to set a Cue Target with AppleScript. Below is what I have, but it is not working and is throwing an error:
-----------------

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

set theResponse to display dialog "Goto Subtitle #" default answer "" with icon note buttons {"Cancel", "Continue"} default button "Continue"

--> {button returned:"Continue", text returned:"1"}

set cue target of cue "ST1" to text returned of theResponse

end tell

-----------------

error "QLab got an error: Can’t make \"5\" into type cue." number -1700 from "5" to cue

-----------------

I am not sure what I am missing, any help is much appreciated. 

Benjamin Farrar

Screen Shot 2022-03-21 at 11.28.23 AM.png

CueTarget.qlab4

Sam Kusnetz

unread,
Mar 21, 2022, 1:32:14 PM3/21/22
to ql...@googlegroups.com
Hi Benjamin

You’re running into a semantic issue… if “5” is the cue number of the cue you want to target, we humans say “cue 5” and know that it MEANS the cue which has the number “5”. But machines cannot immediately discern what you want here… “is Benjamin talking about the cue which has cue number 5, or is he talking about the cue number itself?”

To address this, change this line:

set cue target of cue "ST1" to text returned of theResponse

to this:

set cue target of cue "ST1" to cue (text returned of theResponse)

Best

Sam

Sam Kusnetz (he/him) | Figure 53



--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/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+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/65c25ff5-a6e7-406d-ba18-0b7d9fc9342cn%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages