Advertisement
duquesne9

Make single Eos OSC for QLab

Oct 28th, 2019
1,916
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global dialogTitle
  2. set dialogTitle to "Create LX Cue OSC"
  3. tell application id "com.figure53.QLab.4" to tell front workspace
  4.     set lxNum to my enterSomeText("Enter Cue List/Cue Number in x/y format", "1/1", false)
  5.     set theLabel to lxNum
  6.     make type "OSC"
  7.     set thecue to last item of (selected as list)
  8.     set the patch of thecue to 3
  9.     set the osc message type of thecue to custom
  10.     set the custom message of thecue to " /eos/cue/" & lxNum & "/fire/"
  11.     set the q name of thecue to "LX " & theLabel -- names the cue based on EOS number
  12.     set the q number of thecue to "LX " & theLabel -- numbers the cue based on EOS number
  13. end tell
  14.  
  15. on enterSomeText(thePrompt, defaultAnswer, emptyAllowed) -- [Shared subroutine]
  16.     tell application id "com.figure53.QLab.4"
  17.         set theAnswer to ""
  18.         repeat until theAnswer is not ""
  19.             set theAnswer to text returned of (display dialog thePrompt with title dialogTitle default answer defaultAnswer buttons {"Cancel", "OK"} ¬
  20.                 default button "OK" cancel button "Cancel")
  21.             if emptyAllowed is true then exit repeat
  22.         end repeat
  23.         return theAnswer
  24.     end tell
  25. end enterSomeText
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement