--make group cues from 2 columns of an open Excel spreadsheet (in excel.app)
tell application "Microsoft Excel" to tell active sheet to set theRowCount to ((first row index of (get end cell 99999 of column 1 direction toward the top)))
repeat with eachRow from 1 to theRowCount
tell application "Microsoft Excel" to tell active sheet
set theQnumber to value of cell ("A" & eachRow as text)
set theQname to value of cell ("B" & eachRow as text)
end tell
tell application id "com.figure53.QLab.5" to tell front workspace
make type "group" --assumes mode and other parameters set in cue template
set theCue to last item of (selected as list)
set the q number of theCue to theQnumber
set the q name of theCue to theQname
end tell
end repeat


set the cue target of theCue to cue theTarget
ONE...MISSING...WORD! Following the previous pattern didn't work. How does one know that missing word is needed
This has me thinking, (having now successfully learned how to use a spreadsheet to create Group, Network and Start cues, is it possible to add a cue type to the spreadsheet to create a different type cue with each line, and if the cue type is Group, then the following cues, until the next Group cue get imbedded inside the group just created?
-
-read q types from column A of an Excel spreadsheet and put cues inside groups
--first cell of column A must be group
tell application "Microsoft Excel" to tell active sheet to set theRowCount to ((first row index of (get end cell 99999 of column 1 direction toward the top)))
repeat with eachRow from 1 to theRowCount
tell application "Microsoft Excel" to tell active sheet
set theQtype to value of cell ("A" & eachRow as text)
set theQnumber to value of cell ("B" & eachRow as text)
end tell
tell application id "com.figure53.QLab.5" to tell front workspace
if theQtype is "group" then
make type "group" --assumes mode and other parameters set in cue template
set theGroup to last item of (selected as list)
set the q number of theGroup to theQnumber
else
make type theQtype
set theCue to last item of (selected as list)
set the q number of theCue to theQnumber
set theCueID to uniqueID of theCue
move cue id theCueID of parent of theCue to end of theGroup
end if
end tell
end repeat
You would probably want to add another column to indicate which cues were to be nested, so you could put groups inside groups, or not move non group cues etc. but in the screen recording attached I am just using a spreadsheet with the q types in column A and the cue numbers in column B