set myOSC to "/cue/eventName*/liveText " & quoted form of "\"Hello World!\""
do shell script "echo " & myOSC & " | nc -u -w 0 127.0.0.1 53535"
On Sep 24, 2020, at 12:44 PM, micpool <m...@micpool.com> wrote:
Caution - This email is from outside ORCSD. Do not click links or open attachments unless you recognize the sender and know the content is safe.
--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/3cb6f20b-2a14-40dd-8f27-dfbaba268d09n%40googlegroups.com.
Nils Erickson
Live & Location Audio
www.TravelingMonkeySound.com 707.636.4042 (office)
617.921.5437 (cell)
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/3a4deb3c-ee6f-4076-9eec-7f17f8c2b824n%40googlegroups.com.
global dialogTitle
set dialogTitle to "Report audio patch names "
set upArrow to ASCII character 30 -- This seems to save quite a few Apple events as System Events asks QLab every time what ASCII character 30 is
set downArrow to ASCII character 31
-- Check that UI element scripting is possible
if checkUIElementsEnabled() is false then return
-- Check QLab is running
tell application "System Events"
set qLabIsRunning to exists (processes whose bundle identifier is "com.figure53.QLab.4")
end tell
if qLabIsRunning is false then
display dialog "QLab is not running." with title dialogTitle with icon 0 buttons {"OK"} default button "OK" giving up after 5
return
end if
-- Check there is a workspace open
tell application id "com.figure53.QLab.4"
try
get front workspace
on error
display dialog "There is no workspace open in QLab." with title dialogTitle with icon 0 buttons {"OK"} default button "OK" giving up after 5
end try
end tell
-- Main routine
tell application id "com.figure53.QLab.4"
activate
end tell
tell application "System Events"
tell (first application process whose bundle identifier is "com.figure53.QLab.4")
-- Show the preferences
if name of front window does not end with "Settings" then
keystroke "," using {command down}
end if
delay 0.1 -- Short delays between keystrokes seem to be necessary for stability
-- Bodge: go to the top of the list of tabs on the left (these buttons do not appear to be UI-scriptable)
repeat 9 times
keystroke upArrow
delay 0.1
end repeat
-- Click down to display the "Network" tab
repeat 1 times
keystroke downArrow
delay 0.1
end repeat
-- Get the patch names
set audioPatchNames to {}
repeat with i from 1 to 8
set end of audioPatchNames to value of pop up button i of front window
end repeat
-- Hide the preferences
click button "Done" of front window
-- Return list of names
return audioPatchNames
end tell
end tell
-- Subroutines
on checkUIElementsEnabled()
tell application "System Events"
if not UI elements enabled then
tell application "System Preferences"
activate
reveal anchor "Privacy_Assistive" of pane id "com.apple.preference.security"
display dialog "UI scripting failed! You need to adjust your privacy settings…"
end tell
return false
else
return true
end if
end tell
end checkUIElementsEnabled
Mic Patch names would substitute
set micPatchNames to {}
repeat with i from 9 to 16
set end of micPatchNames to value of pop up button i of front window
end repeat
-- Hide the preferences
click button "Done" of front window
-- Return list of names
return micPatchNames
repeat 9 times
keystroke upArrow
delay 0.1
end repeat
-- Click down to display the "Network" tab
repeat 4 times
keystroke downArrow
delay 0.1
end repeat
-- Get the patch names
set oscPatchNames to {}
repeat with i from 1 to (number of rows of table 1 of scroll area 2 of front window)
set end of oscPatchNames to value of text field 1 of UI element 2 of row i of table 1 of scroll area 2 of front window
end repeat
-- Hide the preferences
click button "Done" of front window
-- Return list of names
return oscPatchNames