Script to change text format by cue colour?

53 views
Skip to first unread message

Amelia Hawkes

unread,
Oct 26, 2025, 9:19:48 AM (5 days ago) Oct 26
to QLab
Hiya, I am a bit stuck on a script that changes a text cues font by the cue colour and I was wondering if a) What I'm trying to do is possible and b) where I'm going wrong! 

Alternatively, if theres a way (or script) to just select cues by cue colour then I can paste cue properties. 
I am new to scripting so forgive any silly mistakes, here's where I got to: 

tell application id "com.figure53.QLab.5" to tell front workspace
set selectedCues to (selected as list)
repeat with eachcue in selectedCues
if q color of eachcue is "red" then
set theFormat to {fontName:"Andale Mono"}
set text format of "selectedCues" to theFormat

end if
end repeat
end tell

(Running up to date Qlab 5) 
Cheers in advance! - Millie

Rich Walsh

unread,
Oct 26, 2025, 9:48:25 AM (5 days ago) Oct 26
to ql...@googlegroups.com
You’re very close… Swap:

set text format of "selectedCues" to theFormat


For:

set text format of eachcue to theFormat


Or, to do every cue in the workspace:

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

repeat with eachCue in (cues whose q color is "red")

set theFormat to {fontName:"Andale Mono"}

set text format of eachCue to theFormat

end repeat

end tell


Rich

Rich Walsh

unread,
Oct 26, 2025, 10:13:59 AM (5 days ago) Oct 26
to ql...@googlegroups.com
Actually, for a marginal speed increase, declare the variable outside the repeat loop:

set theFormat to {fontName:"Andale Mono"}

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

repeat with eachCue in (cues whose q color is "red")

set text format of eachCue to theFormat

end repeat

end tell


Rich

Millie

unread,
Oct 26, 2025, 3:07:21 PM (4 days ago) Oct 26
to QLab
Brilliant, thank you very much Rich. This now does exactly what I needed it to and has saved me a ton of time!

Thanks again!
Millie

Paul

unread,
Oct 29, 2025, 2:24:02 PM (2 days ago) Oct 29
to QLab
You don't even need a loop for this, you can do it in a one line script

tell application id "com.figure53.QLab.5" to tell front workspace to set text format of cues whose q color is "red" to {fontName:"Andale Mono"}


Reply all
Reply to author
Forward
0 new messages