Re: Parameters for "path to" Command
Re: Parameters for "path to" Command
- Subject: Re: Parameters for "path to" Command
- From: Christopher Nebel <email@hidden>
- Date: Mon, 22 Jul 2002 19:08:59 -0700
On Monday, July 22, 2002, at 06:12 PM, Jeffrey Berman wrote:
I downloaded the "Folder.h" file from Chris's iDisk page. However, I
found that the file does not list some four-character codes used in the
"Open Special Folder" script -- such as "mdoc" for the "Movies" folder
or "pdoc" for the "Pictures" folder -- nor does it include either the
"egfp" code or the equivalent "frontmost application" term. I'm still
left wondering whether there is a single source listing all word terms
and four-characters codes that can be used with the "path to" command.
First, a little background: "path to" is (mostly) a thin wrapper around
the Folder Manager, which will tell you where various "well-known"
folders are so you don't have to hard-code paths in your code. "path
to" will accept a four-character string as input and pass it directly to
the Folder Manager, which is why this trick works in the first place.
Folders.h is the public API for the Folder Manager, so it's as complete
a list as exists anywhere public, assuming you've got an up-to-date
copy. (heh.)
As for the codes you failed to see: "mdoc" and "pdoc" were missing
because I hadn't updated the file in some time, but I have now, so you
might have another go at it. "egfp" is actually special to the "path
to" addition itself -- this is where the "mostly" part above comes in.
In addition to Folder Manager codes, "path to" accepts two custom
selectors: "frontmost application" (egfp) and "startup disk" (boot).
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.