Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on linkinuscmd(cmd)
- set defaultString to "/me is currently not running Spotify."
- tell application "System Events"
- set MyList to (name of every process)
- end tell
- tell application "System Events" to set appList to ¬
- name of application processes whose frontmost is true
- set activeApp to item 1 of appList
- if (MyList contains "Spotify") is true then
- set theSong to do shell script ¬
- "syslog -F '$(Message)' -E none -d -w 1 -k Sender GrowlHelperApp | while read song; do
- if [[ `echo $song | grep \"^Spotify:\"` ]]; then
- echo \"$song)\"
- killall syslog
- exit
- fi
- done"
- end if
- if "Spotify:" is in theSong then return "/me " & theSong
- return defaultString
- end linkinuscmd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement