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


Click here to return to the 'Turn AirPort on or off with AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Turn AirPort on or off with AppleScript
Authored by: keyslapper on Jul 31, '07 08:25:06AM

Hmm ... No, it doesn't work like that for me:

$ scselect AirPort-Off
Set "AirPort-Off" not available.

Defined sets include: (* == current set)
0 (Automatic)
* AB4F8C43-A465-4DFA-80BC-BA93FDBD51FB (Work)
8FF3D441-21F0-432A-B216-3A7B2D3F3456 (Home)
(Hex strings and Location names modified to protect the guilty)

The manpage suggests that scselect only provides access to different location configurations. No mention of "AirPort-Off" or "AirPort-On".



[ Reply to This | # ]
Turn AirPort on or off with AppleScript
Authored by: Eric3 on Jul 31, '07 08:45:45AM

The scselect command is for switching between locations you've defined in System Preferences > Network. The command I listed wouldn't work for you because you don't have a Location named "AirPort-Off". You can create a new location with the "New Location..." command in the Location: popup menu; in my case I created one named "AirPort-Off" and disabled AirPort for it.

Now in your case, you have three locations defined: Automatic, Home, and Work. To switch between them, you would run one of "scselect Automatic", "scselect Work", or "scselect Home".

---
---
Eric3

[ Reply to This | # ]