I use my bluetooth headphones, alot. I also pair/repair them depending on which device I am using at the moment. Although my headphones (SX-991) support dual pairing I have found it much more reliable to just re-pair them for the task at hand.
OSX actually handles this very well and I do not have to go through the entire BT pairing process each time on my mac. I just toggle pairing mode on my headphones and then attempt to connect to them from OSX and everything magically works.
This was working on macOS Sierra 10.12.3 as of Mar-2017, although you may need to grant access to whatever method you use to run this in the security preferences panel. Google it you can't miss it.
All you should have to do is change the
"SX-991" string to match the name of your device and you should be set.
The only caveat I have found is that now in macOS Sierra it is damn near impossible to give osascript accessibility rights. To work around this I just export an app from Script Editor
activate application "SystemUIServer" tell application "System Events" tell process "SystemUIServer" -- Working CONNECT Script. Goes through the following: -- Clicks on Bluetooth Menu (OSX Top Menu Bar) -- => Clicks on SX-991 Item -- => Clicks on Connect Item set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth") tell btMenu click tell (menu item "SX-991" of menu 1) click if exists menu item "Connect" of menu 1 then click menu item "Connect" of menu 1 return "Connecting..." else click btMenu -- Close main BT drop down if Connect wasn't present return "Connect menu was not found, are you already connected?" end if end tell end tell end tell end tell