Re: URL Access Scripting and OS X
Re: URL Access Scripting and OS X
- Subject: Re: URL Access Scripting and OS X
- From: Christopher Nebel <email@hidden>
- Date: Tue, 20 Nov 2001 14:34:35 -0800
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