I have an unknown issue that requires me to reboot my airport extreme base station periodically (ever 4-7 days). I don't know what causes it and frankly I don't care anymore.
I'd like to schedule a restart or the base station every night however I have the base station as well as most of my equipment plugged into a UPS so I can't just plug the base station into an indigo module and cut the power to the module. It seems like it should be pretty simple to write an applescript to do this which I can then schedule via indigo.
Here's a script that I found online that works up to the point of clicking menu item 2 (Restart) This doesn't return an error but nor does it actually restart the device. I've tried naming the menu item rather than referencing the number of the item but I receive an error that it couldn't access menu item Restart of menu bar 1 etc.
activate application "AirPort Utility"
-- * once seems not to be enough
activate application "AirPort Utility"
tell application "System Events"
-- * click on the selected Airport Extreme
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 4
tell application "System Events"
-- * click on the selected Airport Extreme
click menu item 2 of menu "Base Station" of menu bar 1 of application process "AirPort Utility"
end tell
-- * tell process "AirPort Utility"
--* click menu item "Restart..." of menu "Base Station" of menu bar 1
--* end tell
end tell
Anybody have an example script that works?