Re: Script Fails in Snow Leopard - Adobe Unit Types.osax
Re: Script Fails in Snow Leopard - Adobe Unit Types.osax
- Subject: Re: Script Fails in Snow Leopard - Adobe Unit Types.osax
- From: Deivy Petrescu <email@hidden>
- Date: Tue, 1 Sep 2009 21:34:06 -0400
On Sep 1, 2009, at 9:04 PM, Paul Scott wrote:
So, let me get this right. I'm getting a warning about a scripting
addition that I'm not using, that Applescript isn't using, that
nobody is using, that someday someone might be using? Who's bright
idea was that?
Keep in mind that the warning is causing my script to fail. The
script was written so that if no other Terminal windows are open,
then Terminal quits. Otherwise, it only closes the window it opened
and leaves Terminal active. It has always worked fine. However,
because of this warning I am now prompted incessantly by Terminal to
verify that I want to close the window. I do have prompting in
Terminal turned on with exceptions, but no exceptions that I could
devise prevents the prompting, and before Snow Leopard the existing
exceptions worked fine.
Paul
Paul,
In my previous message I stated precisely what was causing your problem.
When you call osascript from Terminal running in 64-bit then it will
try to load the OSAxen available and it will be able to load only the
64-bit ones.
It is providing you with a message to let you know that, so if
expected to have a result from a 32-bit OSAX you should sit down and
wait. Forever!
If you do not want to have the error messages trap them in Terminal
tell application "Terminal"
activate
set w to front window
if busy of w then
set w to do script ""
end if
set s to ""
set s to s & "/bin/sh -c '"
set s to s & "ssh -t haven pine;"
set s to s & "COUNT=$(osascript -e \"tell application \\\"Terminal\\
\" to get count of windows\ 2>&1 &");" --->note the 2>&1 &
set s to s & "if [ 0$COUNT -le 1 ] ; then "
set s to s & "osascript -e \"tell application \\\"Terminal\\\" to
quit saving no\" 2>&1 &;"
set s to s & "else "
set s to s & "osascript -e \"tell application \\\"Terminal\\\" to do
script \\\"exit\\\" in selected tab of front window\" 2>&1 &;"
set s to s & "fi"
set s to s & "'"
do script s in w
end tell
Deivy Petrescu
email@hidden
_______________________________________________
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
This email sent to email@hidden