첨부 된 URL에서 깔끔한 예제를 사용했습니다. 지금까지 스크립트가 ssh 세션과 함께 여러 탭을 여는 중입니다. 하지만 여러 클라이언트가 서버에 연결되어 있기 때문에 모든 클라이언트에 대해 하드 코딩 된 목록이있는 스크립트는 필요하지 않습니다. 에서 항목 중 하나를 선택한 후iTerm이 여러 ssh 세션을 열어달라고 말합니다.
--set wseServer to {"xen", "bcs", "db", "lx", "mgr", "nx", "proxy", "smb", "wiki", "zarafa"} as list
set wseServer to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-wse-deb.pssh")
--set edlServer to {"edl", "edev", "edb", "emon"}
set edlServer to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-edl.pssh")
set allServer to wseServer & edlServer
set serverList to button returned of (display dialog "Dude, choose your prefered connection List" buttons {"wseServer", "edlServer", "allServer"} with title "SSH Server" default button 3 with icon caution giving up after 5)
tell application "iTerm"
activate
set myTerm to (make new terminal)
tell myTerm
repeat with hostItem in serverList
set Lsession to (make new session)
tell Lsession
--set secureshell to hostItem exec command "ssh " & hostItem
exec command "ssh " & hostItem
--sleep to prevent errors if we spawn too fast
do shell script "/bin/sleep 0.01"
end tell
end repeat
end tell
end tell
: 나는 ...
하지만 지금 내가 붙어있어 대화 상자를 추가하려고한다는 I'ld 연결하고자 목록에있는 묻는 dialod 상자를 원하는 dialog iterm이 8 탭을 열면 ssh가 실행되고 닫힙니다 ... 아무런 오류가 없습니다!
이것은 예를 들어 내가 확장하기 위해 노력하고있어입니다 : http://code.google.com/p/iterm2/wiki/AppleScript
내가 거의 다 해요하지만 솔루션을 볼 수 없습니다 알아!
모든 물건은 "말할 응용 프로그램 위의 제거 : 당신의희망 하나는 힌트 ... 자신에게