Re: how can script bundles store extra stuff?
Re: how can script bundles store extra stuff?
- Subject: Re: how can script bundles store extra stuff?
- From: Daniel Jalkut <email@hidden>
- Date: Sun, 24 Jul 2005 09:14:39 -0400
Hi has:
On Jul 24, 2005, at 7:38 AM, has wrote: 'path to me' is a synonym for 'path to current application'. It's really a bug - 'path to me' is both meaningless and misleading - but Apple are unlikely to change the current behaviour as it'd break lots of existing code.
They fixed it in 10.4. If you have ADC Reference Library installed, look at:
You'll find within it this text:
"The path to me command now returns the correct result for compiled scripts, including those that are run using the run script command."
I did decide to experiment with it by disabling FastScripts' built-in path handler, and it seemed to work, but then for some scripts I saw coercion errors. So I suspect they've implemented it essentially as a path to even handler with limited coercion support.
With old-style applet shells it's not an issue as the executable and script are the same file anyway, thus 'path to current application' automatically gives the desired result. And some OSA client applications provide their own ad-hoc workarounds by intercepting the 'path to current application' event and returning a path to the file from which that script was loaded; it's a total hack and semantically incorrect, but it generally gives the user the value they want.
Since it appears that even Apple has embraced this hack, perhaps its semantic incorrectness is diminished? I think if the words are "path to me" then it's quite reasonable to expect the script, because that's the only "me" the script author knows.
Daniel
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden