Monday, 30 May 2011

Toggle Airport On and Off

The hint 'Control Airport Without Menu Bar' in the June issue of Macworld (also see this article) was very informative and useful. I devised a simple script based on the article hint that toggles airport on and off.

Here is the script. Copy and Paste it into AppleScript Editor and save it as an Application.
 -- -- Toggle Airport Power On and Off -- if (offset of "On" in (do shell script "networksetup -getairportpower en1")) > 0 then 	do shell script "networksetup -setairportpower en1 off" else 	do shell script "networksetup -setairportpower en1 on" end if 

[crarko adds: I tested this, and it works as described. It follows precisely the method described in the linked Macworld article, in c ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Source: http://feeds.macosxhints.com/click.phdo?i=ca797c685c9b8db62867024110fa3a89

imac store news from apple mac computer news applecare

No comments:

Post a Comment