how to adress a users folder on Mac OSX
Devin Asay
devin_asay at byu.edu
Thu Jan 18 12:21:06 EST 2007
On Jan 18, 2007, at 9:29 AM, Ken Ray wrote:
>
> On Jan 18, 2007, at 10:23 AM, Devin Asay wrote:
>
>>
>> On Jan 18, 2007, at 9:00 AM, Phil Davis wrote:
>>
>>> Hi Richard,
>>>
>>> Here's one way:
>>>
>>>
>>> -- button script
>>> on mouseUp
>>> put ($HOME & "/Library") into tTargetFolder
>>> set the defaultFolder to tTargetFolder
>>> put the files into fld 1
>>> end mouseUp
>>>
>>>
>>> "$HOME" is an environment variable - always there, no need to
>>> define it.
>>
>> Here's another approach:
>>
>> put put specialFolderPath("cusr") & "/Library" into tTargetFolder
>> set the defaultFolder to tTargetFolder
>> put the files into fld "LibContents"
>
> Also, for a quick lookup of specialFolderPath codes, see my tip on
> the subject:
>
> http://www.sonsothunder.com/devres/revolution/tips/file010.htm
A perusal of Apple's complete list of folder constants at <http://
developer.apple.com/documentation/Carbon/Reference/Folder_Manager/
Reference/reference.html#//apple_ref/c/tdef/FolderType> (the URL
cited in the specialFolderPath Rev dictionary entry) shows that Apple
may have added a few since you put your reference together, Ken. They
include useful ones like:
cusr - the current user's home folder
sdat - the shared user data folder (usually /Users/Shared in OSX)
pubb - the current user's public folder
ssnd - the system sounds folder
info - the Documentation folder
wcmp - the QuickTime components folder
There are probably more nuggets there to be discovered. 8^)
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list