specialFolderPath function (Mac OS X)

Ken Ray kray at sonsothunder.com
Sat Dec 21 18:05:01 EST 2002


Great find, Dave! I'll add that to the tips list for future reference!

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message ----- 
From: "Dave Cragg" <dcragg at lacscentre.co.uk>
To: <use-revolution at lists.runrev.com>
Sent: Saturday, December 21, 2002 4:00 PM
Subject: specialFolderPath function (Mac OS X)


> Hi
> 
> I just made a small discovery concerning the specialFolderPath 
> function on Mac OS X. (Apologies if this is common knowledge.)
> 
> There was some discussion in the past on this list about extending 
> the specialFolderPath function on Windows with numerical codes. (Ken 
> Ray very kindly documented these codes on his site. 
> <http://www.sonsothunder.com/devres/metacard/tips/win003.htm>).
> 
> I was wondering whether there was anything similar for Mac OS X (I 
> was wanting to locate a user's "Application Support" folder). After 
> looking around some sample AppleScripts, I discovered there are 
> indeed various codes ( a huge number it seems). And these codes 
> (mostly 4-character strings) seem to work with the specialFolderPath 
> function. For example:
> 
> get specialFolderPath("cusr") returns (on my system) 
> "/Volumes/taro_1/Users/dave"
> 
> get specialFolderPath("asup") returns "/Library/Application Support"
> 
> After further poking around, I found these codes can be found 
> (amongst other stuff) in the "folders.h" file which resides deep in 
> the Library folder (try a find in the Finder to locate it).
> 
> It looks like the file contains codes for both OS X and earlier OS 
> versions, but I've not been able to test them on Mac OS 8/9 yet.
> 
> Bear in mind that these extensions to specialFolderPath aren't 
> documented, and therefore we should assume they aren't officially 
> supported. (Probably with good reason as not all codes will work 
> across all OS versions). But I thought it might be of use to someone.
> 
> Cheers
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list