Adding quotes to Cue Numbers

47 views
Skip to first unread message

Adam Burgess

unread,
Jul 22, 2024, 5:11:22 AM (5 days ago) Jul 22
to QLab
Hey all. Scripting newbie!
I think I'm aware of the differences between cue "104" and cue 104.
I think the question is how to add quotes to the cue numbers generated from this…?

    repeat with i from 1 to 16
        set j to (i * 100) + 4
        set armed of cue j to 1
    end repeat

Following works as expected, but as the project grows, hardcoding stuff feels wrong and getting very bloated…

set armed of cue "104" to 1
set armed to cue "204" to 1
set armed of cue "1604" to 1

Cheers, Adam

micpool

unread,
Jul 22, 2024, 5:16:35 AM (5 days ago) Jul 22
to QLab

J as text

Paul

unread,
Jul 22, 2024, 7:23:11 AM (5 days ago) Jul 22
to QLab
cue 1 is the first cue you add to your workspace
cue "1" is the cue numbered 1
they may be the same thing, but cue 10 and cue "10" are almost certainly not the same thing.

so in a script,  someCueNum needs to be a string and if a number can be converted by using "as string"

this should do what you want
tell application id "com.figure53.QLab.5" to tell front workspace
repeat with cueNum from 104 to 1604 by 100
try
set armed of cue (cueNum as string) to false
end try
end repeat
end tell

Paul

unread,
Jul 22, 2024, 7:29:04 AM (5 days ago) Jul 22
to QLab
but you can also do this with wildcard OSC in a Network cue, if you cue numbering scheme matches
/cue/*04/armed false
[backup your workspace first and test this carefully as you may get inadvertent matches!]

Adam Burgess

unread,
Jul 22, 2024, 7:39:06 AM (5 days ago) Jul 22
to QLab
Thanks, guys.

I kept getting errors trying to make j as text in a few different places in the script. Restarted and all is well.

Good to know about the OSC wildcard method. 
Reply all
Reply to author
Forward
0 new messages