Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- COLLATE ADD GROUPS, LX, SFX, PROJ
- global dialogTitle, sharedPath, numCues
- set dialogTitle to "Collate Cue lists - CAUTION"
- --set numCues to "2"
- set numCues to my enterSomeText("WARNING: If top level cue is not group, any attempt to add new cue to that number will delete the new cue
- How many groups?", "2", false)
- tell application id "com.figure53.qlab.3" to tell front workspace
- repeat with g from 10 to numCues by 5
- make type "group"
- set newGroup to last item of (selected as list)
- set properties of newGroup to {q name:"Cue " & g, q number:g, mode:fire_all}
- end repeat
- -------------------------
- --MOVE INTO GROUPS--
- -------------------------
- delay 0.1
- tell application "System Events"
- keystroke "a" using {command down}
- end tell
- set numCues to my enterSomeText("WARNING: If top level cue is not group, any attempt to add new cue to that number will delete the new cue
- Highest number of an SFX Cue?", "2", false)
- repeat with eachQ in (selected as list)
- set eachQID to uniqueID of eachQ
- repeat with p from 10 to numCues by 5
- if q number of eachQ ends with p & ".SFX" then
- move cue id eachQID of parent of eachQ to end of cue (p as text)
- end if
- --exit repeat
- end repeat
- end repeat
- set numCues to my enterSomeText("WARNING: If top level cue is not group, any attempt to add new cue to that number will delete the new cue
- Highest number of an LX cue?", "2", false)
- tell application id "com.figure53.qlab.3" to tell front workspace
- -------------------------
- --MOVE INTO GROUPS--
- -------------------------
- repeat with eachQ in (selected as list)
- set eachQID to uniqueID of eachQ
- repeat with p from 10 to numCues by 5
- if q number of eachQ ends with p & ".LX" then
- move cue id eachQID of parent of eachQ to end of cue (p as text)
- end if
- --exit repeat
- end repeat
- end repeat
- end tell
- set numCues to my enterSomeText("WARNING: If top level cue is not group, any attempt to add new cue to that number will delete the new cue
- Highest number of a Proj Cue?", "2", false)
- tell application id "com.figure53.qlab.3" to tell front workspace
- -------------------------
- --MOVE INTO GROUPS--
- -------------------------
- repeat with eachQ in (selected as list)
- set eachQID to uniqueID of eachQ
- repeat with p from 10 to numCues by 5
- if q number of eachQ ends with p & ".PROJ" then
- move cue id eachQID of parent of eachQ to end of cue (p as text)
- end if
- --exit repeat
- end repeat
- end repeat
- end tell
- end tell
- on enterSomeText(thePrompt, defaultAnswer, emptyAllowed) -- [Shared subroutine]
- tell application id "com.figure53.QLab.3"
- set theAnswer to ""
- repeat until theAnswer is not ""
- set theAnswer to text returned of (display dialog thePrompt with title dialogTitle default answer defaultAnswer buttons {"Cancel", "OK"} ¬
- default button "OK" cancel button "Cancel")
- if emptyAllowed is true then exit repeat
- end repeat
- return theAnswer
- end tell
- end enterSomeText
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement