• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: constant afdregfp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: constant afdregfp


  • Subject: Re: constant afdregfp
  • From: Chris Nebel <email@hidden>
  • Date: Mon, 09 Apr 2001 21:39:05 -0700
  • Organization: Apple Computer, Inc.

Michelle Steiner wrote:

> On 4/9/01 8:10 PM, Romulus Barabas <email@hidden> wrote:
>
> >I found this script:
> >
> >set appath to (path to +constant afdregfp;)
>
> that first line does not compile on my system. I suspect that it
> requires an OSAX.

No osaxen required -- just change the + and ; to left and right chevrons,
respectively. The fact that this is showing up as a raw code is a bug --
it's supposed to show up as "frontmost application", which is still
defined enumeration for "path to". I think this broke in 1.3, but we
never really noticed.

To answer the original question: "path to" will work with any FindFolder
code as a four-character string. FindFolder is the underlying API call
that "path to" uses to tell where interesting folders are. For example,
"path to" doesn't define a term for the Favorites folder, but you can get
it by saying this:

path to "favs" --> "Macintosh HD:System Folder:Favorites:"

The authoritative source for these codes is the file Folders.h from the
Mac OS Universal Headers. These are designed for C programmers, but you
can pick out the relevant information without too much trouble even if
you don't know C.

You can download the complete headers from Apple's developer pages (see
ftp://ftp.apple.com/developer/Development_Kits/UniversalHeaders3.3.2.sit.hqx),
or you can grab a couple of selected ones from my iDisk
(http://homepage.mac.com/c.nebel): Folders.h for "path to", and Gestalt.h
for "computer" (aka "system attribute" on Mac OS X). Enjoy!


--Chris Nebel
AppleScript Engineering


  • Follow-Ups:
    • Re: constant afdregfp
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: ´constant afdregfpª (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: ´constant afdregfpª
  • Next by Date: Re: Çconstant afdregfpÈ
  • Previous by thread: Re: ´constant afdregfpª
  • Next by thread: Re: constant afdregfp
  • Index(es):
    • Date
    • Thread