Guest User

Untitled

a guest
Aug 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. sudo defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekKeyboard '1'
  2. sudo defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekPointingDevice '1'
  3.  
  4. tell application "System Events"
  5. tell process "SystemUIServer"
  6. tell (menu bar item 1 of menu bar 1 whose description is "bluetooth")
  7. click
  8. click menu 1's second menu item
  9. end tell
  10. end tell
  11. end tell
  12.  
  13. osascript -e 'tell application "System Events" to tell process "SystemUIServer" to tell (menu bar item 1 of menu bar 1 whose description is "bluetooth") to {click, click (menu item 2 of menu 1)}'
  14.  
  15. tell application "System Preferences"
  16. set current pane to pane id "com.apple.preferences.bluetooth"
  17. tell application "System Events"
  18. tell process "System Preferences"
  19. click checkbox "On" of window "Bluetooth"
  20. end tell
  21. end tell
  22. quit
  23. end tell
Add Comment
Please, Sign In to add comment