make text cue from excel
duquesne9 Jul 10th, 2018 (edited) 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- --Version 2.0
- --Written by Chase Elison 6/15/2018
- --Fully automatic script. Handles multiple Q lists.
- --Modified from Jack Baxter's code, THANK YOU JACK.
- display dialog "WARNING! DO NOT run this code unless you have the CSV file open in Excel that you exported from the console."
- set namePrefix to the text returned of (display dialog "What prefix would you like for the cues? (e.g. Q1, Light Cue 1, LQ1...)" default answer "Q")
- set textCol to "B"
- set startRow to "2"
- set endRow to "700" --this is really just a bailout number now, since this code is automatic
- set cellval to "Cell"
- set rowNum to startRow
- --repeat until rowNum = endRow + 1
- tell application "Microsoft Excel"
- repeat until (value of cell ("A" & rowNum) as string) is "END_TARGETS"
- if (value of cell (textCol & rowNum) as string) is not "" then
- set textTxt to (value of cell (textCol & rowNum) as string) as string
- set textTxt to "" as string
- end if
- tell application id "com.figure53.QLab.3" to tell front workspace
- make type "title"
- set newQ to last item of (selected as list)
- set text of newQ to textTxt
- set the q number of newQ to ""
- end tell
- set rowNum to rowNum + 1
- end repeat
- end tell
- display dialog (rowNum as string) & " was the final row!"
RAW Paste Data