• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Openning a System Preferences panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Openning a System Preferences panel (From: "William E. Jens" <email@hidden>)

  • Prev by Date: Openning a System Preferences panel
  • Next by Date: Re: Design Advice Sought for Interesting NSTableView
  • Previous by thread: Openning a System Preferences panel
  • Next by thread: Develop at Skype
  • Index(es):
    • Date
    • Thread