AppleScript command to arm or disarm selected cue?

525 views
Skip to first unread message

Projectile Objects

unread,
Aug 8, 2023, 9:37:06 AM8/8/23
to QLab
I'm looking for a simple script since there isn't a keyboard shortcut for this.


Right now I have:

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

set armed to true

end tell

but it doesn't work.


What's the correct formula?

Thanks

Chris Ashworth

unread,
Aug 8, 2023, 10:08:30 AM8/8/23
to Projectile Objects, ql...@googlegroups.com
Hi there P.O.,

The part you’re missing is that this workspace is attempting to tell the workspace to set armed to true, rather than a cue within the workspace.

Here is one example of how to modify your script to direct the instruction to a specific cue:

tell application id "com.figure53.QLab.5" to tell front workspace
set armed of cue "2" to true
end tell


The scripting examples in the documentation will give you some other ways to address cues, such as addressing the currently selected cue(s):


Best,
Chris
--
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/2bb3736c-4ab3-43b5-b208-4777b9862d25n%40googlegroups.com.

Chris Ashworth

unread,
Aug 8, 2023, 10:09:01 AM8/8/23
to Projectile Objects, ql...@googlegroups.com
Sorry, typo: “this script is attempting to tell the workspace” 

Projectile Objects

unread,
Aug 8, 2023, 10:17:13 AM8/8/23
to QLab
Thanks,

I was aware of directing it to a specific cue, but is there any way to make it more broad? So a single AppleScript will arm or disarm whatever is selected? 


tell application id "com.figure53.QLab.5" to tell front workspace
set armed of selected to true
end tell


Chris Ashworth

unread,
Aug 8, 2023, 10:19:59 AM8/8/23
to Projectile Objects, ql...@googlegroups.com
Hi there,

The scripting examples in the documentation will give you some other ways to address cues, such as addressing the currently selected cue(s):


Best,
Chris

Projectile Objects

unread,
Aug 8, 2023, 10:49:40 AM8/8/23
to QLab
Thank you.

I got it with:

tell application id "com.figure53.qlab.5"

repeat with theCue in (selected of front workspace as list)

try

set armed of theCue to true

end try

end repeat

end tell

micpool

unread,
Aug 8, 2023, 12:41:46 PM8/8/23
to QLab
Generally, when setting a parameter of all  selected cues, OSC wins hands down for conciseness, and possibly speed!

/cue/selected/armed 1


/cue/selected/armed 0

Mic

▒░ProjectileObjects░▒

unread,
Aug 8, 2023, 2:55:30 PM8/8/23
to ql...@googlegroups.com
Thanks Mic,

I'd use OSC, but I was unfamiliar with how to run an OSC command out of AppleScript.  I made a QLab 5 & 4 profile and series of scripts for LoupeDeck/Razor/Logitech devices. https://www.reddit.com/r/qlab/comments/15gil6i/loupedeck_plugin_profile_for_qlab/

I've completed all the scripts I needed to toggle various commands in QLab outside of the keyboard shortcuts.   It's a really handy tool, but currently doesn't send out OSC (only MIDI, AppleScript, Shortcuts, and so on).

If you feel like sharing your idea for an OSC version of this script, please post it so myself and others can find it in the future.

Regards,
Cornelius

You received this message because you are subscribed to a topic in the Google Groups "QLab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qlab/JgC0r6OVfnk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/fd2a9781-a28a-4c33-9c60-f83e8b7ac577n%40googlegroups.com.


--
▓▒░Projectile Objects░▒▓

micpool

unread,
Aug 8, 2023, 4:13:34 PM8/8/23
to QLab

The easiest way to use OSC from a script (or MIDI trigger) from an external device is to make a network cue with the OSC message sending to QLab on port 53000  and get the script or MIDI trigger to start the cue.

e.g number the cue “OSC1”

And use this script

tell application id "com.figure53.qlab.5” to tell front workspace to start cue “OSC1”

Reply all
Reply to author
Forward
0 new messages