Hello everyone.
I would like to know correct script for telnet connection.
Below script is one I made. But it is not working.
Especially I don't know what I should use keyword or command on red part.
Please teach me how solve this problem.
Thank you for your attention.
I would like to know correct script for telnet connection.
Below script is one I made. But it is not working.
Especially I don't know what I should use keyword or command on red part.
Code:
launch "iTerm"
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default Session"
tell the last session
write text "telnet 192.168.2.3 2001"
write text "enable"
write text "password"
write text "reload"
[COLOR="Red"]if output = [/COLOR]"System configuration has been modified. Save? [yes/no]:" then
write text "n"
[COLOR="red"]else if output = [/COLOR]"Proceed with reload? [confirm]" then
write text "y"
end if
end tell
end tell
end tell
Please teach me how solve this problem.
Thank you for your attention.
Last edited by a moderator: