Applescript make new cue inside selected group

734 views
Skip to first unread message

Golla

unread,
Mar 15, 2017, 1:51:55 AM3/15/17
to QLab
Hey all,

Probably a simple thing I can’t figure out or I’m stupidly missing. I start with a list of group cues and I’ve got an applescript to make a new OSC cue (still in v3 until next year’s budget) using some quickly chosen settings. Is there a way to put that new cue *inside* the selected group rather than underneath it (at the same level as the selected group cue), so I don’t then have to move the new cue into the group? Since parent is r/o I’m thinking not, but hoping there is.

Golla

--------------------------------------------------
Andrew Golla
Associate Professor of Theater
Graduate Program Director, M.F.A. in Directing
University of Portland
SDC Coordinator - KC/ACTF Region 7

Rich Walsh

unread,
Mar 15, 2017, 4:57:56 AM3/15/17
to ql...@googlegroups.com
You have to use move from the Standard Suite:

movev : Move object(s) to a new location.
move specifier : the object(s) to move
to location specifier : The new location for the object(s).

It’s pernickety about how you specify the objects involved, but this form works (this will make an OSC Cue at the end of a selected Group Cue):

tell application id "com.figure53.QLab.3"
tell front workspace
set selectedCue to last item of (selected as list)
if q type of selectedCue is "Group" then
make type "OSC"
set newCue to last item of (selected as list)
set newCueID to uniqueID of newCue
move cue id newCueID of parent of newCue to end of selectedCue
end if
end tell
end tell

Rich

Golla

unread,
Mar 15, 2017, 3:48:28 PM3/15/17
to QLab
That did it. Thanks Rich! While I might have found the move command, it would have taken forever to figure out that syntax.
Reply all
Reply to author
Forward
0 new messages