Saturday, May 12, 2012

How to toggle Mac WiFi (Airport) via a keyboard combination with BetterTouchTool

I was playing around with BetterTouchTool today (which, by the way, is one of the best Mac addons I've ever seen) and decided that I wanted to have a keyboard combination to toggle my Wifi settings.  BetterTouchTool gives you the ability to execute a script, however, that causes a Terminal window to open if you write a bash script.  This can be disabled through other means, but I found out it's easiest to just write an AppleScript file.

The code below is what I'm using to do this.  I've bound this script to a keystroke combination via BetterTouchTool, and it's working perfectly:

7 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Thanks! A good way for saving battery. BetterTouchTool should be a standard for Apple computers! ;)

    ReplyDelete
  3. I bought a watch for my boyfriend at this online store. The watch runs on time, the quality is very good, the style of the watch is very like, it is worth buying.
    buy uk fake watches

    ReplyDelete
  4. Remaining at airport hotels is a superb thought in the event that you have an early morning flight or need a place to rest after a trip before continuing your adventure.Hotel near zona rosa kansas city

    ReplyDelete
  5. It's a similar when you arrive back late during the evening and you can't confront the trip back home, particularly if open transport isn't notwithstanding running!hotel near kansas city hotels in kansas city mo near airport

    ReplyDelete
  6. Trains raced to Malaga City Center at regular intervals from 06:49 to 23:49. The single admission is somewhere in the range of EUR1.20 and EUR1.30 relying upon the day of movement. Voyage time around 10 minutes. La quints inn and suites kansas city

    ReplyDelete
  7. One great model is a representative who discovers it excessively badly designed, making it impossible to need to take a maneuver to the downtown area to discover settlement. Another could be a carrier traveler on a corresponding flight that has been postponed.extended stay hotel in hays ks

    ReplyDelete