Newly bust in OSX: ":" as alias
Newly bust in OSX: ":" as alias
- Subject: Newly bust in OSX: ":" as alias
- From: Charles Arthur <email@hidden>
- Date: Fri, 2 Nov 2001 22:54:44 +0000
For those who haven't yet found this and are working in both X and Classic...
(apologies if this was covered back when X.0.0.0.0.0 was released in March,
but I've just got bitten.)
In pre-OSX, one could get the path to the enclosing folder of the running
application using
":" as alias
for example
property : ":" as alias
run in, say, Smile, gives
--> alias "Mac HD:Applications (Mac OS 9):Smile :"
However, in OSX it gives -when run say from Script Editor, which lives in
"Mac HD:Applications:AppleScript:Script Editor.app:" [note that that's a
folder] -
--> "Mac HD:" (which is the boot disk, in my case. YMMV.).
OK, so it's not exactly bust, but it doesn't work like you might expect.
One gets that Script Editor path by doing "path to me".
But when I used Script Editor to save the script as an app, living on
different disk, and get it to show "path to me" it gives
"Mac HD:Applications:AppleScript:Script Editor.app:".
Ooh dear, this is going to be confusing. I'd like to set a property which
gives the path to the enclosing folder of a script saved as an app, so it
can be used in 9 and X. I'm starting to think this is going to be really
hard.
In fact I'm not sure if there is a shortcut in X to get the path to the
application. I think I'll go and look at the Apple site documentation...
http://www.ukclimbing.com : 1,000+ British crags, 350+ British climbing walls
- searchable by distance rock type, etc, with 5-day weather forecasts for
every one - plus maps, articles, news, and the New Routes database. There's
even a cool shop attached...