tell application "System Events"
tell application "System Preferences"
reveal anchor "Network" of pane id "com.apple.preference.network"
tell window "Network" of process "System Preferences"
tell pop up button 1
pick menu item "Home" of menu 1
click button "Apply Now"
quit application "System Preferences"
Sunday, July 15, 2007
Applescript to change Network Location
I have the need to change my network location from time to time. Opening the preference pane and making the change is tedious. Below is the applescript that I invoke from Quicksilver to change this. I'm still not sold on the language but being able to script the UI is fantastic.