GUI: New Location in Network Pref Pane
GUI: New Location in Network Pref Pane
- Subject: GUI: New Location in Network Pref Pane
- From: Stephen Swift <email@hidden>
- Date: Wed, 02 Apr 2003 17:51:07 -0500
Hello all,
I'm trying to script the Network preferences to create a new location with
some PPP and TCP/IP settings.
Thanks to the wonderful UI Browser by PreFab, I've been able to figure out a
lot. But, I've come across one problem: pop-up menus. I can click them, I
can't figure out how to change their value. For example, say the current
location the in Network pane is "Home" but I want it to switch to "New
Location..." Is there a good way of doing this? Set value by number or by
string? Send a keystroke? Thanks for any help.
-Stephen
The code I have so far:
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Network" of menu "View" of menu bar 1
delay 3
click radio button "TCP/IP" of tab group 1 of group 1 of window
"Network"
click pop up button 1 of window "Network"
set value of pop up button 1 of window "Network" to "New
Location..."
--This last line does not work.
end tell
end tell
Stephen Swift
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.