Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old Dec 26, 2012, 06:51 AM   #1
SOOMINAHN
macrumors newbie
 
Join Date: Dec 2012
HELP Applescript for telnet

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.

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"
			if output = "System configuration has been modified. Save? [yes/no]:" then
				write text "n"
			else if output = "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 OllyW; Dec 26, 2012 at 12:45 PM. Reason: Please use code tags
SOOMINAHN is offline   0 Reply With Quote

 
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:43 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC