I'm using this script:
tell application "System Preferences" to activate
tell application "System Events"
tell process "System Preferences"
click button "Network" of window "System Preferences"
delay 1
end tell
end tell
It compiles well, but it doesn't run!
It comes up with the error:
System Events got an error: Cant get button "Network" of window "System Preferences" of process "System Preferences".
I want the script to automate opening up system preferences, then opening up sharing, then turning "web sharing" on and off.
Please help! Thanks.
tell application "System Preferences" to activate
tell application "System Events"
tell process "System Preferences"
click button "Network" of window "System Preferences"
delay 1
end tell
end tell
It compiles well, but it doesn't run!
It comes up with the error:
System Events got an error: Cant get button "Network" of window "System Preferences" of process "System Preferences".
I want the script to automate opening up system preferences, then opening up sharing, then turning "web sharing" on and off.
Please help! Thanks.