Created
December 13, 2011 17:23
-
-
Save danreedy/1473013 to your computer and use it in GitHub Desktop.
Out of Range Bluetooth Proximity Script
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 t to "" | |
set t to do shell script "security 2>&1 find-generic-password -gl ScreenSaverPassword" | |
set KeyKind to "generic password" | |
set text item delimiters to "acct" -- Get Account name | |
set tlst to every text item of t | |
set acct to item 2 of tlst | |
set text item delimiters to "\"" | |
set tlst to every text item of acct | |
set text item delimiters to "\"" -- Get Password | |
set tlst to every text item of t | |
set pw to item 2 of tlst | |
tell application "Spotify" to play | |
tell application "System Events" to keystroke return | |
delay 1 | |
tell application "System Events" to keystroke pw | |
delay 1 | |
tell application "System Events" to keystroke return |
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
tell application "Spotify" to pause | |
tell application id "com.apple.ScreenSaver.Engine" to launch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment