Skip to content

Commit

Permalink
Adapted move to cut list
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmith96 committed Mar 17, 2021
1 parent 11a043f commit 6393bb6
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
-- @description Move to cut list
-- @author Ben Smith
-- @link bensmithsound.uk
-- @source Sam Schloegel
-- @version 1.0
-- @source Sam Schloegel (adapted)
-- @version 2.0
-- @testedmacos 10.13.6
-- @testedqlab 4.6.9
-- @about Moves the selected cues to a cut cue list, and removes their cue number
-- @separateprocess TRUE

-- @changelog
-- v2.0 + creates cue list if needed, renumbered
-- v1.0 + init


Expand All @@ -22,16 +23,24 @@ set cutListName to "Cut Cues"
-- RUN SCRIPT -----------------------------

tell application id "com.figure53.Qlab.4" to tell front workspace

set theSelection to (selected as list)

-- Create cue list if necessary, or switch to it
try
set cutList to first cue list whose q display name is cutListName
set cutList to first cue list whose q name is cutListName
on error
return
make type "cue list"
set cutList to first cue list whose q name is "Cue list"
set q name of cutList to cutListName
set q color of cutList to "scarlet"
collapse cutList
end try

repeat with eachCue in theSelection
if q number of eachCue is not "" then
set q name of eachCue to ("(" & q number of eachCue & ") " & q list name of eachCue)
set q number of eachCue to ""
set q number of eachCue to "x" & q number of eachCue
end if

set cueID to uniqueID of eachCue
Expand All @@ -41,7 +50,7 @@ tell application id "com.figure53.Qlab.4" to tell front workspace
set wall clock trigger of eachCue to disabled
set armed of eachCue to false
if parent list of eachCue is not cutList then
move cue id cueID of parent of eachCue to beginning of cutList
move cue id cueID of parent of eachCue to end of cutList
end if
end repeat
end tell

0 comments on commit 6393bb6

Please sign in to comment.