Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create an applescript to allow me to connect to a bluetooth device by it's Bluetooth ID.

So far, i've managed to get an applescript to turn on bluetooth if it's off. Here's the code:

# This is only necessary, if AppleScripts are not yet allowed to change checkboxes
tell application "System Events" to set UI elements enabled to true
# Now change the bluetooth status
  tell application "System Preferences"
    set current pane to pane id ""
      tell application "System Events"
        tell process "System Preferences"
        # Enabled is checkbox number 2
        if value of checkbox 2 of window "Bluetooth" is 0 then
            click checkbox 2 of window "Bluetooth"
        end if
    end tell
end tell
end tell

Would someone know if and how it's possible to set up a new bluetooth device and if it'd be posible to connect to a device based on it's device name/ it's device bluetooth ID?

I've also tried to record the action in Automator but for the "set up new device" option, Automator just tells me: "click on "" button". Thanks

share|improve this question
Found your question via Google because I'm hoping to find a solution as well. If I have any luck I'll be sure to post an answer here (though things aren't looking promising). – Wilco Oct 1 '13 at 23:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.