Last active
December 20, 2015 11:29
-
-
Save jamesstout/6124139 to your computer and use it in GitHub Desktop.
Activate Bluetooth device
This file contains 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
set mouseName to "James Mouse" -- edit as appropriate | |
-- SystemUIServer controls the right hand side of the Menu bar - AHA! | |
tell application "System Events" to tell the front menu bar of process "SystemUIServer" | |
activate | |
delay 0.5 | |
tell menu bar item 1 | |
click | |
tell menu item mouseName of menu 1 | |
click | |
delay 0.2 | |
tell menu item 1 of menu mouseName | |
click | |
delay 0.2 | |
end tell | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment