Having updated to 10.4.3 from 10.3.9, this script is no longer working. It’s a GUI script that allowed us to push the proper DNS servers and search domains in to the proper fields when iPass (a global dialer) clears them out. Any ideas why the script might not work any longer?
Thanks!
tell application “Finder”
activate
end tell
set DNSServer to “192.168.101,192.168.1.1”
set SearchDomain to “asia.mygreatdomain.com, na.mygreatdomain.com, intranet.mygreatdomain.com”
tell application “System Preferences”
activate
set current pane to pane “com.apple.preference.network”
end tell
tell application “System Events”
if UI elements enabled then
get properties
tell process "System Preferences"
tell window "Network"
click pop up button 2
click menu item "Internal Modem" of menu "OtherViews" of pop up button 1
tell group 1
tell tab group 1
delay 1
click radio button "TCP/IP"
tell group 1
set value of text field 1 to DNSServer
delay 1
set value of text field 2 to SearchDomain
end tell
end tell
end tell
click button "Apply Now"
delay 1
end tell
end tell
tell application "System Preferences"
set current pane to pane "com.apple.preference.network"
quit saving yes
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "To run this script, UI element scripting must be enabled. To enable UI element scripting, select the \"Enable access for assistive devices\" option."
end tell
end if
end tell