set ssh_user to "user" -- Пользователь SSH set ssh_server to "27.27.27.27" -- IP адрес сервера set ssh_password to "password" -- Пароль tell application "Terminal" activate tell application "System Events" to keystroke "t" using command down repeat while contents of selected tab of window 1 starts with linefeed delay 0.01 end repeat delay 0.7 do script "ssh " & ssh_user & "@" & ssh_server in window 1 delay 1.5 do script ssh_password in window 1 end tell
Классное руководство по AppleScript на русском — macbug.ru/applescript.php
Хороший сборник примеров по AppleScript — macdaily.me/howto/welcome-to-applescript-part-1/