|
|
#1 |
|
MVP
Join Date: Sep 2003
Posts: 1,856
|
Schedule wireless on Airport Extreme
This may seem like an odd request...
I'm wondering if there is any way to script (Applescript, Terminal, Automator or other) a schedule to turn the wireless setting in Airport Utility on or off at a set time? |
|
|
|
|
|
#2 |
|
Hall of Famer
Join Date: Oct 2002
Location: Halifax, Canada
Posts: 4,945
|
I assume you mean without losing its wired connectivity. Otherwise, just turn it off with a timer?
__________________
17" MBP, OS X 10.8.3; 27" iMac, OS X 10.8.3 |
|
|
|
|
|
#3 |
|
MVP
Join Date: Sep 2003
Posts: 1,856
|
Ah! Yes unfortunately I do mean with maintaining wired connectivity...otherwise what a brilliant lo-tech solution!
|
|
|
|
|
|
#4 |
|
Hall of Famer
Join Date: Oct 2002
Location: Halifax, Canada
Posts: 4,945
|
You can turn the wireless portion off. I couldn't get this to take the last step:
Code:
launch application "AirPort Utility" delay 3 tell application "System Events" tell process "AirPort Utility" activate tell window 1 click button 5 delay 3 tell tab group 1 click radio button 3 delay 3 tell menu of pop up button 1 delay 1 click menu item "Off" end tell end tell end tell end tell end tell
__________________
17" MBP, OS X 10.8.3; 27" iMac, OS X 10.8.3 |
|
|
|
|
|
#5 |
|
MVP
Join Date: Sep 2003
Posts: 1,856
|
You are awesome! I understand enough to unpick a little bit of applescript, but not enough to start one up myself.
Here's what I worked out was missing: Code:
launch application "AirPort Utility" delay 5 tell application "System Events" tell process "AirPort Utility" activate tell window 1 click button 5 delay 10 tell tab group 1 click radio button 3 delay 3 click pop up button 1 tell menu of pop up button 1 delay 1 click menu item "Off" end tell end tell end tell end tell end tell That's really great, much appreciated. Now all I've got to do is get it to happen at a specific time! |
|
|
|
|
|
#6 |
|
Hall of Famer
Join Date: Oct 2002
Location: Halifax, Canada
Posts: 4,945
|
Thanks for the discovery -- it was getting late and I couldn't see what was wrong with that. By the way, you can probably reduce the delay times; I always set them long to be sure the last step has finished before the next event command.
With respect to scheduling this to happen at a specific time, you either need third-party software to do it, or you need to learn about launchd, the OS X method for scheduling events.
__________________
17" MBP, OS X 10.8.3; 27" iMac, OS X 10.8.3 |
|
|
|
|
|
#7 | |||||||||||||||||||||||
|
Prospect
Join Date: May 2008
Location: Leeds, UK
Posts: 35
|
I wish I was clever enough to understand what any of that meant.
__________________
"When injustice becomes law, resistance becomes duty." |
|||||||||||||||||||||||
|
|
|
|
|
#8 |
|
Hall of Famer
Join Date: Oct 2002
Location: Halifax, Canada
Posts: 4,945
|
It's not a matter of clever. I own a piece of software called UI Browser that exposes how the GUI of an application works, i.e., what it's elements (objects) are called and "who" they belong to in the object model of the software. Background software (always running) called System Events controls the interactions between software running on your Mac and the windows it presents to you. When you do something to an interface object, System Events transmits this to the application to "inform" it of your change. The code above is a way to have an AppleScript send those same events to the application GUI objects as if you had done them to the user interface.
__________________
17" MBP, OS X 10.8.3; 27" iMac, OS X 10.8.3 Last edited by NovaScotian; 08-17-2008 at 09:49 AM. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|