on run
try
tell application "System Events" to get id of process
"Terminal"
set haveTerminal to true
on error
set haveTerminal to false
end try
tell application "Terminal"
activate
try
set w to front window
if haveTerminal is true then
set w to do script ""
end if
on error
set w to do script ""
end try
set s to "/bin/sh -c 'ssh -t haven pine'"
do script s in w
delay 1
repeat until not busy of w
delay 1
end repeat
set windowCount to count of windows
do script "exit" in w
if (haveTerminal is equal to false) and (windowCount ≤ 1)
then
quit saving no
end if
end tell
end run
I still think there's a bug in osascript for complaining about
something I'm not using. I may or may not open a bugreport on it. I'll
think on it for awhile.
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users