1 Reply Latest reply: Jul 15, 2011 8:52 AM by Pierre L.
whereswalden90 Level 1 (0 points)

I am trying to write a script that adds a new 802.1X profile. This is what I have so far:


tell application "System Preferences"


    set the current pane to pane id "com.apple.preference.network"

    get the name of every anchor of pane id "com.apple.preference.network"

    reveal anchor "Advanced Airport" of pane id "com.apple.preference.network"

    get the name of every anchor of current pane

    reveal anchor "802.1X" of current pane


    delay 3


    tell application "System Events"

        click menu button 1 of tab group 1 of sheet 1 of window "Network"

    end tell

end tell


Theoretically, menu button 1 should be the little plus at the bottom of the User Profiles pane, but when I run the script, it returns "System Events got an error: Can’t get window "Network"."


I just pulled the path off of UI Browser. What did I do wrong?

Mac OS X (10.6.8)