2012-01-16 8 views
2

/W I持って、ターミナルを開き、リモートホストに接続し、そこにスクリプトを起動し、次のスクリプト、:SET TERMINALタブ名のAppleScript

tell application "Terminal" 
    activate 
    do script "ssh [email protected]" 
    delay 10 
    do script "sh ./startserver" in front window  
end tell 

どのように私はこのターミナルタブの名前を設定することができますか?

答えて

2
tell application "Terminal" 
    activate 
    do script "ssh [email protected]" 
    delay 10 
    do script "sh ./startserver" in front window 
    set input to "\"\\033]0;<your title here>\\007\"" 
    do script "echo -n -e " & input 
end tell 

<your title here>は、タイトルを希望するテキストに置き換えてください。

+0

最後に 'do script'で「前のウィンドウ」を追加すると、ありがとう! – user967722

2
tell app "Terminal" to set custom title of tab 1 of front window to "my tab name"