Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --defines
- set namePrefix to "LX"
- set lblCol to "F"
- set listnumCol to "C"
- set qnumCol to "D"
- set sceneEndCol to "AG"
- set sceneNotesCol to "AF"
- set qNotesCol to "AE"
- set startRow to "3"
- set endRow to "700"
- set cueCount to ""
- --main
- tell application "QLab 3" to tell front workspace
- --repeat for all selected cues, how to iterate over entire cue list?
- repeat with targetQ in (selected as list)
- set test to q number of targetQ
- set rowNum to startRow
- tell application "Microsoft Excel"
- --repeat runs theCue through Excel document until reaches end, how to make stop if it find match? can repeats have or statements?
- repeat until (value of cell ("A" & rowNum) as string) is "END_TARGETS"
- --Checks for a note
- if (value of cell (sceneEndCol & rowNum) as string) is "Scene_End" then
- --makes note value usable
- 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 (sceneNotesCol & rowNum) as string) is not "" then
- set lblTxt to (value of cell (sceneNotesCol & rowNum) as string) as string
- else
- set lblTxt to "" as string
- end if
- set qName to lblTxt & " END"
- --creates newQ, then moves it into targetQ, deletes newQ if targetQ is not group
- tell application id "com.figure53.QLab.3" to tell front workspace
- set qNum to (q number of targetQ) & ".END"
- make type "Memo"
- set newQ to last item of (selected as list)
- set properties of newQ to {q name:qName, q number:qNum, continue mode:do_not_continue}
- set newCueID to uniqueID of newQ
- --move cue id newCueID to after cue targetQ
- --set targetQNum to "\"" & (q number of targetQ) & "\""
- tell parent of newQ
- --move cue id newCueID to after cue "\"TargetQ\""
- --move cue id newCueID to after cue ("\"" & (q number of targetQ) & "\"")
- move cue id newCueID to after cue (q number of targetQ)
- end tell
- set continue mode of parent of newQ to auto_continue
- set myCue to q number of newQ
- set myColor to "yellow"
- set myOSC to "/cue/" & myCue & "/colorName " & myColor
- do shell script "echo " & myOSC & " | nc -u -w 0 127.0.0.1 53535"
- --set q color of newQ to "red"
- set rowNum to rowNum + 1
- exit repeat
- 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