Re: Openning a System Preferences panel
Re: Openning a System Preferences panel
- Subject: Re: Openning a System Preferences panel
- From: David LeBer <email@hidden>
- Date: Mon, 19 Nov 2007 11:16:09 -0500
On 19-Nov-07, at 11:08 AM, William E. Jens wrote:
I'd like to open the System Preferences -> Network -> Proxies panel.
I'm
pretty sure I've seen this in at least one application, but I can't
figure out how to do it.
I don't know if this is the best way to do this, but it is working for
us:
- (IBAction)openProxiesSystemPrefs: (id)sender {
NSString* appleScriptString =
@"tell application \"System Preferences\" \n\
activate \n\
reveal anchor \"Proxies\" of pane \"com.apple.preference.network\"
\n\
end tell";
NSAppleScript *theScript = [[NSAppleScript alloc]
initWithSource:appleScriptString];
[theScript executeAndReturnError:nil];
}
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden