Created
August 24, 2012 03:21
-
-
Save amoblin/3445107 to your computer and use it in GitHub Desktop.
Revisions
-
amoblin revised this gist
Aug 24, 2012 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,29 +4,29 @@ set username to "" set login_passwd to "" set passcode_prefix to "" set dest_ip to "" set init_command to "" set host_name to "10.210.224.66" set terminal_name to "Terminal" set delay_time to 1 tell application terminal_name activate tell application "System Events" keystroke "t" using {command down} delay delay_time keystroke "ssh " & username & "@" & host_name & "\n" delay delay_time keystroke login_passwd & "\n" delay delay_time keystroke passcode_prefix end tell display dialog "ESCODE: " default answer "1" tell application "System Events" keystroke (text returned of the result) & "\n" & dest_ip & "\n" delay delay_time keystroke init_command & "\n" end tell end tell -
amoblin created this gist
Aug 24, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ #!/usr/bin/osascript set username to "" set login_passwd to "" set passcode_prefix to "" set dest_ip to "" set host_name to "10.210.224.66" set terminal_name to "Terminal" set delay_time to 1 tell application terminal_name activate tell application "System Events" keystroke "t" using {command down} delay delay_time keystroke "ssh " & username & "@" & host_name & "\n" delay delay_time keystroke login_passwd & "\n" delay delay_time keystroke passcode_prefix delay delay_time end tell display dialog "ESCODE: " default answer "1" tell application "System Events" keystroke (text returned of the result) & "\n" delay delay_time keystroke dest_ip & "\n" end tell end tell