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:

4 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