Spotify commands when song is playing

  • I've had no problem creating a script to open spotify and start a particular playlist. What I can't seem to figure out is how to control spotify ONCE A SONG IS ALREADY PLAYING. For example, the script below will increase the volume no problem when a song is not playing in spotify. But if something is playing, it's completely unresponsive. Essentially, any SendKeys commands are just ignored when Spotify is playing a song. Anyone solve this issue? Thanks in advance!

    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.AppActivate "spotify"
    WshShell.SendKeys "^{UP}"

  • @dougcolt, I don't know. I'll have to try it myself, but initially I'm thinking it might take a second for Windows to make "spotify" the current application (I assume that's what WshShell.AppActivate does. So you might need a delay between that command and the up arrow.

Log in to reply