How to script Bluetooth on/off and Tethering on Snow Leopard

I doubt the following helps, but I cannot test it. Still, maybe it helps you find a solution...

Maybe MarcoPolo can help. It can trigger an action (like: enable bluetooth) when some condition is met (like when some application starts running, or maybe when you are out of reach of some network).

So: if for tethering you start some specific program:

  • Start the tethering application
  • Open MarcoPolo's preferences
  • On the Contexts pane, add a new Context and give it a name like "Tethering active"
  • On the Rules pane, select "Add RunningApplication Rule". The dropdown will show you all applications that are currently running, so you can then select your tethering application. Link that to the Context you just created.
  • On the Actions pane, select "Add ToggleBluetooth Action" and link it to the "arrival" of the Context you just created.
  • Likewise: disable bluetooth for "leaving" that Context

I think there's not really such application, is there? :-(


Sure, you can do this.

  1. Open up Automator, and create a service.
  2. Record yourself turnng on/off bluetooth.
  3. Save the service.
  4. Open up the Keyboard Preferences pane
  5. Click the Keyboard Shortcuts tab, and then select Services on the left, and scroll down to General on the right.
  6. Check the box next to your new service.
  7. Double-click to the right of your new service, near the scroll bar, to set a shortcut key.

Hope that helps!