i ended turning the extreme off every evening... it does not lose any setting when i restart it in the morning. doing that for 2 years without any problem.
would be also interested into a more elegant solution...
Yes it's taken a while for me to post, but I came across this thread hopeful to find something useful. I've been looking for a script to put on my MacMini Mediaserver to automate starting up and shutting down the wifi at night. This is for an Airport Extreme, and resets PPPoE at the end. You will need to add your wifi name and password into the script (so yes you will have to update security on the startup script file in a secure enviroment).
The script below needs to be dissected into two scripts for a start up and shutdown. Copy the lot and paste into AppleScript and save as the Startup script. Do the same again but modify it - the Shutdown code is commented out with notes to put it back in and delete the startup code.... Enjoy
activate application "AirPort Utility"
-- * start twice just in case first time fails
activate application "AirPort Utility"
tell application "System Events"
-- * select Airport (i.e. first object below Internet world)
perform action "AXPress"
of image 2
of group 1
of scroll area 1
of window 1
of application process "AirPort Utility"
-- * wait for the data of Airport Extreme to be loaded in the small popup menu
delay 3
-- * click on the edit button
perform action "AXPress"
of button "Edit"
of group 1
of pop over 1
of image 2
of group 1
of scroll area 1
of window 1
of application process "AirPort Utility"
-- * click the Wireless tab
perform action "AXPress"
of radio button "Wireless"
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 2
--* Select Network Mode "Off"
--* perform action "AXPress" of pop up button 1 of tab group 1 of sheet 1 of window 1 of application process "AirPort Utility"
--* perform action "AXPress" of menu item 4 of menu 1 of pop up button 1 of tab group 1 of sheet 1 of window 1 of application process "AirPort Utility"
--* delay 2
--* code for turn off Wireless - ENDS (to create a separate OFF script uncomment (i.e. remove --* ) the three lines above and delete all below until "--* Update the airport")
--* select Network Mode "Create a wireless network" using the network values here:
set wirelessName
to "WIFINAME"
set wirelessPass
to "WIFIPASSWORD"
perform action "AXPress"
of pop up button 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
perform action "AXPress"
of menu item 1
of menu 1
of pop up button 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 1.5
--* Enter your wireless name after clearing field
tell text field 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
set value
of attribute "AXFocused"
to true
keystroke wirelessName
end tell
perform action "AXConfirm"
of text field 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 1.5
--* select WPA2 Personal (menu row 4)
perform action "AXPress"
of pop up button 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
perform action "AXPress"
of menu item 4
of menu 1
of pop up button 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 1.5
--* enter password twice (set in next line)
perform action "AXPress"
of text field 1
of group 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
tell text field 1
of group 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
set value
of attribute "AXFocused"
to true
keystroke wirelessPass
end tell
perform action "AXConfirm"
of text field 1
of group 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 1.5
--* reenter your network password again
perform action "AXPress"
of text field 2
of group 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
tell text field 2
of group 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
set value
of attribute "AXFocused"
to true
keystroke wirelessPass
end tell
perform action "AXConfirm"
of text field 2
of group 1
of group 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 2
--* Airport Utility bug - when you create a wireless network, Internet tab "Connect Using" resets to DHCP from PPPoe!
--* This section resets "Connect Using" back to PPPoe and assumes previous settings are remembered.
perform action "AXPress"
of radio button "Internet"
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 2
perform action "AXPress"
of pop up button 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
perform action "AXPress"
of menu item 3
of menu 1
of pop up button 1
of tab group 1
of sheet 1
of window 1
of application process "AirPort Utility"
delay 2
-- * Update the Airport
click button "Update"
of sheet 1
of window 1
of application process "AirPort Utility"
delay 4
-- * Quit Airport utility
delay 60
tell application "AirPort Utility"
to quit
end tell