-- Takes the Q number from the column on the main cue list of the selected cues, and adds that to the start of the Notes section. If a Q Number already exists in the format "- SQ x -", it will be replaced, if not it won't -- by Gareth Fry tell application "QLab" tell front workspace repeat with currentCue in (selected as list) --try set currentNotes to notes of currentCue as string if ((q number of currentCue) as string) is not "" then -- if no q number then skip if currentNotes is "missing value" then set currentNotes to "" else -- skip if no notes if ((first character of currentNotes) as text) is "-" then -- if existing number,remove SQ number set AppleScript's text item delimiters to {"-"} set noteParts to (every text item in currentNotes) as list set notes of currentCue to (items 3 through -1 of noteParts as string) set currentNotes to notes of currentCue -- set AppleScript's text item delimiters to "" end if end if set notes of currentCue to ("- SQ " & q number of currentCue & " -" & (ASCII character 13) & currentNotes) -- add SQ number to notes end if --end try end repeat end tell end tell