tell application "Terminal"
set currentTab to do script ("telnet 10.0.1.45 10000")
delay 0.1
keystroke "return"
delay 0.1
do script ("C0D") in currentTab
delay 0.1
end tell
I've tested the telnet commands in terminal. They work. However, Qlab will not send the keystroke "return" properly. I receive "ERROR: Terminal got an error: Can't get keystroke "return". (-1728)
I need the return keystroke because the Christie L2k1000 wants a network password through telnet even though I haven't set one. It wants the default.
Any ideas? Suggestions? Need more info?
Wags
tell application "Terminal"activatetell application "System Events"tell application process "Terminal"key code 36end tellend tellend tell
tell application "Terminal"
do script ("telnet 10.0.1.45 10000") in window 1
delay 0.1
tell application "Terminal"
tell application "System Events"
tell application process "Terminal"
key code 36
end tell
end tell
end tell
delay 0.1
do script ("C0D") in window 1
delay 1
tell application "System Events"
do shell script "kill -9 " & unix id of process "Terminal"
end tell
end tell
Not exactly what I would expect, but maybe this will work well enough.
tell application "Terminal"do script "quit" in front windowquitend tell
tell application "Terminal"activatedo script ("telnet 10.0.1.45 10000") in front windowdelay 0.1
tell application "System Events"tell application process "Terminal"key code 36end tellend tell
delay 0.1do script ("C0D") in front windowdelay 1do script "quit" in front window -- Exit Telnet sessionquitend telltell application id "com.figure53.QLab.4"activateend tell
--
Contact support anytime: sup...@figure53.com
Follow Figure 53 on Twitter: https://twitter.com/Figure53
User Group Code of Conduct: https://figure53.com/help/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/f6f2602a-3e8a-4d01-81f5-352748ea2b46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 4 Sep 2018, at 13:14, Jason Wagner <wag...@gmail.com> wrote:
Rich,
I see how that could work, but Terminal puts up a dialog box asking for confirmation of the "quit" during the telnet session. By the way, if it matters, I'm running High Sierra with QLab 3 & 4.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/eb5cfbfa-514b-4e90-818a-0d284e9ecb77%40googlegroups.com.
tell application "System Events"
keystroke "c" using {control down}