Created
December 28, 2019 05:43
-
-
Save jimmythai/18c4f7daa30080b1e9bdae7063d4813d to your computer and use it in GitHub Desktop.
Open System Preferences -> Bluetooth -> Toggle the Bluetooth on/off switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Preferences" | |
reveal pane "com.apple.preferences.Bluetooth" | |
end tell | |
clickBluetoothSwitch() | |
delay 2 | |
clickBluetoothSwitch() | |
quit application "System Preferences" | |
on clickBluetoothSwitch() | |
tell application "System Events" to tell process "System Preferences" | |
click button 3 of window 1 | |
end tell | |
end clickBluetoothSwitch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment