Openning a System Preferences panel

  • 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.

    _____________________________________________
    William E. Jens - PagePath Technologies, Inc.
    Developers of ~MyOrderDesk~
    http://PagePath.com
  • 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
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today