Script to change surface of a video cue

186 views
Skip to first unread message

Tim Rogers

unread,
Jul 6, 2015, 6:07:19 PM7/6/15
to ql...@googlegroups.com
Can anyone think of a clever way to create a script to change the surface of the selected cues?

I've been enjoying writing scripts for QLab - using both the native AppleScript interface and via the nc/OSC hack. But as far as I can tell, there isn't any way to do something like this:

-- Patch selected cues -- Tim Rogers <timmr...@gmail.com> -- Updated to use OSC /cue/selected syntax tell application id "com.figure53.qlab.3" to tell front workspace display dialog "Type new patch number (1-16 for OSC cues, 1-8 for Audio, Mic, MIDI, and Video cues)" with title "New Patch Number" with icon 1 default answer "" set myOSC to "/cue/selected/patch " & myPatch do shell script "echo " & myOSC & " | nc -u -w 0 127.0.0.1 53535" end tell

for Video cue surfaces - at least not without some sort of external helper program.

QLab has a nice OSC interface to change the surface 

/cue/{number}/surfaceID {number}

Get/set the surface ID of the cue.

but no way that I could figure out to get the surfaceID in a way that is scriptable.

Has anyone already solved this? Or does anyone have an idea as to how we might?

Thank you!


 

Tim Rogers

unread,
Jul 7, 2015, 10:08:37 PM7/7/15
to ql...@googlegroups.com
I noticed that the script that I posted is broken. I was trying to simplify it - since it was only an example - but in the process managed to break it. 

This version should work:

tell application id "com.figure53.qlab.3" to tell front workspace display dialog "Type new patch number (1-16 for OSC cues, 1-8 for Audio, Mic, MIDI, and Video cues)" with title "New patch Number" with icon 1 default answer "" try set myPatch to (text returned of result) as number on error display alert "Invalid patch number" message "Please enter a valid patch number." return end try set myOSC to "/cue/selected/patch " & myPatch do shell script "echo " & myOSC & " | nc -u -w 0 127.0.0.1 53535" end tell

 Sorry about that.
Reply all
Reply to author
Forward
0 new messages