I'm new to AppleScript and Automator and seeking help and resources to set up this workflow.
I'm looking to turn of a bunch of microphone devices in a meeting using a script. I can do this successfully using Putty or the Mac Terminal. But to automate it I really it a script. So I attempted to use AppleScript and created the following, which works...but I know there's a better way!
I'd like the whole process to happen in the background without opening the Terminal program. Any advice on how to do this? The device I'm connecting to does not use SSH, but a raw TCP connection, so that's the reason for the "NC" connection.
Thanks in advance!
tell application "Terminal" to activate
tell application "System Events"
keystroke "nc 192.168.34.78 2202"
delay .5
key code 36
delay 0.5
keystroke "< SET 0 PHANTOM_PWR_ENABLE OFF >"
delay 0.5
key code 36
delay 3
key code 8 using control down
tell application "Terminal" to quit
end tell
I'm looking to turn of a bunch of microphone devices in a meeting using a script. I can do this successfully using Putty or the Mac Terminal. But to automate it I really it a script. So I attempted to use AppleScript and created the following, which works...but I know there's a better way!
I'd like the whole process to happen in the background without opening the Terminal program. Any advice on how to do this? The device I'm connecting to does not use SSH, but a raw TCP connection, so that's the reason for the "NC" connection.
Thanks in advance!
tell application "Terminal" to activate
tell application "System Events"
keystroke "nc 192.168.34.78 2202"
delay .5
key code 36
delay 0.5
keystroke "< SET 0 PHANTOM_PWR_ENABLE OFF >"
delay 0.5
key code 36
delay 3
key code 8 using control down
tell application "Terminal" to quit
end tell