Script for opendns - airport extreme DNS updater

Hi,
I’m a complete starter with applescript but mildly dangerous with unix shell scripting. I’m trying to develop a script which will allow me to change the DNS servers specified in “Airport Utility”. I want to be able to jump between DNS servers for “opendns” and my own ISP’s DNS servers. Its an effort to add time-based controls to blocked websites. Any direction much appreciated.

Thanks…Vince.

Figured it out. In case anyone else needs similar here’s the script. Its ugly but it works.:slight_smile:


activate application "AirPort Utility"
tell application "System Events"
	tell process "AirPort Utility"
		delay 5
		tell window 1
			keystroke "l" using command down
			delay 10
			keystroke "2" using command down
			delay 10
			keystroke "f" using command down
			delay 10
			keystroke "DNS"
			delay 5
			keystroke return
			delay 5
			keystroke "208.67.222.222"
			delay 5
			keystroke tab
			keystroke "208.67.220.220"
			delay 5
			keystroke tab
			delay 5
			click button "UPDATE"
			delay 60
			keystroke "q" using command down
		end tell
	end tell
end tell