Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*Currently only moves cues if new placement is in group in Qlab 3, marks misplaced cues red. Fully functional in Qlab4 with edits*)
- set namePrefix to "LX"
- set lblCol to "F"
- set listnumCol to "C"
- set qnumCol to "D"
- set qNotesCol to "AE"
- set startRow to "3"
- set endRow to "700"
- set cueCount to ""
- tell application id "com.figure53.QLab.3" to tell front workspace
- repeat with targetQ in (selected as list)
- set test to q number of targetQ
- set rowNum to startRow
- tell application "Microsoft Excel"
- repeat until (value of cell ("A" & rowNum) as string) is "END_TARGETS"
- if (value of cell (qNotesCol & rowNum) as string) is not "" then
- if (value of cell (qNotesCol & rowNum) as real) mod 1 is 0 then
- set qNotesStr to (value of cell (qNotesCol & rowNum) as integer) as string
- else
- set qNotesStr to (value of cell (qNotesCol & rowNum) as string)
- end if
- if qNotesStr is equal to test then
- --next series creates data for settings in newQ
- if (value of cell (qnumCol & rowNum) as real) mod 1 is 0 then
- set qNumStr to (value of cell (qnumCol & rowNum) as integer) as string
- else
- set qNumStr to (value of cell (qnumCol & rowNum) as string)
- end if
- if (value of cell (lblCol & rowNum) as string) is not "" then
- set lblTxt to " - " & (value of cell (lblCol & rowNum) as string) as string
- else
- set lblTxt to "" as string
- end if
- set qName to namePrefix & qNumStr & lblTxt
- set groupName to lblTxt
- set qCmd to ("/eos/cue/" & (value of cell (listnumCol & rowNum) as integer as string) & "/" & qNumStr & "/fire") as string
- tell application id "com.figure53.QLab.3" to tell front workspace
- set qlq to test & "LX"
- make type "osc"
- set newQ to last item of (selected as list)
- set properties of newQ to {q name:qName, osc message type:custom, custom message:qCmd, q number:qlq, continue mode:auto_continue}
- set newCueID to uniqueID of newQ
- if q type of targetQ is "group" then
- move cue id newCueID of parent of newQ to beginning of targetQ
- else
- set continue mode of cue before newQ to auto_continue
- end if
- if q type of parent of newQ is not "group" then
- set continue mode of newQ to do_not_continue
- end if
- if q type of parent of newQ is "group" then
- set cueCount to ((count cues) in parent of newQ)
- end if
- if cueCount is less than "2" then
- set continue mode of newQ to do_not_continue
- end if
- if q number of cue before newQ is not test then
- set myColor to "red"
- set myOSC to "/cue/selected/colorName " & myColor
- do shell script "echo " & myOSC & " | nc -u -w 0 127.0.0.1 53535"
- --set q color of newQ to "red"
- end if
- set rowNum to rowNum + 1
- end tell
- else
- set rowNum to rowNum + 1
- end if
- else
- set rowNum to rowNum + 1
- end if
- end repeat
- end tell
- end repeat
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement