FROM : David LeBer
DATE : Mon Nov 19 17:16:09 2007
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
DATE : Mon Nov 19 17:16:09 2007
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
| Related mails | Author | Date |
|---|---|---|
| William E. Jens | Nov 19, 17:08 | |
| David LeBer | Nov 19, 17:16 |






Cocoa mail archive

