Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.5: An AppleScript to restart an AirPort Base Station' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: An AppleScript to restart an AirPort Base Station
Authored by: BCooper202 on Jan 06, '08 05:22:08AM

I have two airport stations in my house: an Airport Extreme (named "Airport Bedroom") and an Airport Express (named "Express - Living Room"). When Airport Utility is launched, Airport Bedroom shows at the top of the list, and Express - Living Room is second.

The script works fine in selecting the first one to show in the list: Airport Bedroom.

But when I duplicated the script and tried to tweak it to pick the second it doesn't work -- always picks the first of the two in the list.

The tweak I did was in the line tell window 1 --"AirPort Utility - Extreme Base" -- I changed "Extreme Base" to "Express - Living Room".

But it still picks the Airport Bedroom at the top of Airport Utility's list.

Any clues as to how to fix?

[ Reply to This | # ]
10.5: An AppleScript to restart an AirPort Base Station
Authored by: sweyhrich on Jan 06, '08 08:18:02AM
I found it necessary to make a couple of adjustments (sorry, don't have a solution to the problem of selecting which base station). If it happens that Airport Utility is already open, and the Manual Setup has already been selected, I had the script fail with an error. Instead of these lines:

tell window 1
    click button "Manual Setup"

I replaced them with these lines:

tell menu bar item "Base Station"
    tell menu 1
        click menu item "Manual Setup"
        delay 10
    end tell
end tell

I also increased the delay after activating the script to delay 10, and the delay after "say 'Restarting Airport'" to 5, which works better with my setup. Great script! My airport base station seems to disappear from my laptop after a couple of days, making printing wirelessly impossible to the printer attached to the wired computer connected to the ethernet on the base station. Restarting the station fixes it, so I've got the "Restart Airport" script set to automatically run every morning at 2 am.

Steven Weyhrich

[ Reply to This | # ]