Advertisement
duquesne9

Append Q Number

Jul 4th, 2019
1,291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (*
  2. Tested with QLab v3.2.14 Oct 2018
  3. Please report any issues to robotlightsyou@gmail.com with subject "QLAB 3 template issues"
  4.  
  5. Original from Rich Walsh template.*)
  6.  
  7. -- Declarations
  8.  
  9. global dialogTitle
  10. set dialogTitle to "Add suffix to Cue Number"
  11.  
  12. -- Check the clipboard for a previous suffix
  13.  
  14. try
  15.     set clipboardContents to the clipboard
  16. on error
  17.     set clipboardContents to ""
  18. end try
  19.  
  20. if clipboardContents contains return or clipboardContents contains linefeed then -- Slight protection against spurious Clipboard contents
  21.     set clipboardContents to ""
  22. end if
  23.  
  24. -- Main routine
  25.  
  26. set theSuffix to text returned of (display dialog "Enter the suffix to append:" with title dialogTitle with icon 1 ¬
  27.     default answer clipboardContents buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel")
  28.  
  29. tell front workspace
  30.     repeat with eachCue in (selected as list)
  31.         set q number of eachCue to (q number of eachCue & theSuffix)
  32.     end repeat
  33. end tell
  34.  
  35. -- Copy the suffix to the Clipboard
  36.  
  37. set the clipboard to theSuffix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement