Re: Safari Download Folder?
Re: Safari Download Folder?
- Subject: Re: Safari Download Folder?
- From: Luther Fuller <email@hidden>
- Date: Wed, 04 Mar 2009 12:20:08 -0600
On Mar 4, 2009, at 11:40 AM, Mark J. Reed wrote:
It's a shame you have to somehow find out that application "Safari"
stores its preferences in "com.apple.Safari.plist" for that to work.
It seems like there ought to be a way of asking an application about
its preference settings...
There is a way. And it's standard. Read the value of
CFBundleIdentifier in the application bundle's "info.plist" file. For
Safari this value is "com.apple.Safari". You can also simply get the
'bundle identifier' of StandardAdditions 'info for' command.
Now I have a problem. I read the value of DownloadsPath from Safari's
preference file with this code ...
path to preferences from user domain
tell application "Finder" to set prefsAlias to (file
"com.apple.Safari.plist" of the result) as alias
tell application "System Events"
POSIX path of prefsAlias
set prefsRec to (value of property list file the result)
set dlLoc to (|DownloadsPath| of prefsRec) -- "~/Desktop"
end tell
I can't find any way to convert the string "~/Desktop" to an alias.
Finder and System Events just don't know where "~/Desktop" is located
and error.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden