The Useful Thread

Out of context: Reply #502

  • Started
  • Last post
  • 1,798 Responses
  • akiersky0

    better touch tool: http://www.boastr.net/

    awesome by itself, set keyboard shortcuts to perform applescripts creates global keyboard shortcuts for just about anything. I created this script to toggle play/pause in pandora in Chrome, and with a few changes it should work for almost any other web-music player:

    [CODE]
    tell application "Google Chrome"
    -- play/pause
    repeat with w in (every window)
    repeat with t in (every tab whose URL contains "pandora.com/") of w
    tell t to execute javascript "
    var playPause = document.getElementsByClassName...
    if(playPause.style.display === 'none') {
    playPause = document.getElementsByClassName...
    }
    playPause.children[0].click();"
    return true
    end repeat

    end repeat
    end tell
    return false
    [/CODE]

    • had this running for a couple of months now and its ace! :D
      would recommend.
      Hombre_Lobo

View thread