Re: OSX URL Access Scripting
Re: OSX URL Access Scripting
- Subject: Re: OSX URL Access Scripting
- From: David Achterberg <email@hidden>
- Date: Wed, 21 Nov 2001 07:41:17 -0600
When I try the first suggestion below and compile, a colon ":" is auto
added to the end of the tell application line, like so-
tell application "Macintosh HD:System:Library:ScriptingAdditions:URL
Access Scripting.app:"
and I get an error message Could not run the script because of a program
error. The event log has --> URL Access Scripting got an error:
Extension failure
Any ideas?
Thanks,
David A. Achterberg
On Monday, November 19, 2001, at 08:40 PM, Jon Rosen wrote:
I have an OS X script that uses URL Access Scripting, but always opens
the OS 9 version. If I type ".app" after the name, the suffix
disappears and it continues to open the OS 9 version of URL Access
Scripting. Does anyone know how to force AppleScript to use the OS X
version of an application?
Two things you can do:
1. tell application "full path here, e.g.
HD:System:Library:ScriptingAdditions:URL Access Scripting.app"
If the application is a bundle, you don't have to dig inside it. You
can hard-code the path if you think you can get away with it, or use the
Finder's "get application file id ..." to figure it out.
2. In the absence of any other information, AppleScript in Mac OS X
prefers native applications over Classic ones. The difficulty is that
it maintains a map of names to application locations, so if it's already
seen the Classic one (e.g., by opening a script that refers to it), it
will remain fixated on it. (Yes, we know this is problematic.)
Try opening the original script, copy the entire text, quit Script
Editor (that's the important bit), relaunch it, paste the text into a
new script, and compile. It should now use the native U.A.S.
--Chris Nebel
AppleScript Engineering