Re: Accessing System Preferences?
Re: Accessing System Preferences?
- Subject: Re: Accessing System Preferences?
- From: Seth Willits <email@hidden>
- Date: Sun, 10 Aug 2003 16:16:58 -0700
On Sunday, August 10, 2003, at 02:50 PM, Nick Morris wrote:
I am having a real mental block on this one and after 48 hours of
searching and thinking I still do not have an answer to a really
simple question!
The question: How do I retrieve the System Preference setting for
Mail and Web for a user?
Basically, it is just so the right Applescript fires in my application
for the right mail program or web-broswer.
You'd think there's be a really easy way, but to me it seems weird.
Here's the code to find the user's home web page in the internet
preference pane. I had to go searching through plist files to find the
WWWHomePage key, but there's a website that has them all and someone
posted a link to it but I don't have the email. Search the archives for
WWWHomePage and you should find the thread where he posted that.
Hopefully this will give you an idea:
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSDictionary* dict;
NSString* homePage;
dict = [defaults
persistentDomainForName:@"com.apple.internetconfig"];
NSString * versionKey = [[dict keyEnumerator] nextObject];
homePage = [[[[dict
objectForKey:versionKey]
objectForKey:@"ic-added"]
objectForKey:@"WWWHomePage"]
objectForKey:@"ic-data"];
Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software -
http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine -
http://www.rbdeveloper.com
Webmaster for REALbasic Game Central -
http://www.freaksw.com/rbgames
"If you can't beat your computer at chess, try kick boxing."
-- Someone
------------------------------------------------------------------------
---
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.