• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Spotify commands when song is playing

General Discussion
5
6
1.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dougcolt
    last edited by Jan 30, 2018, 6:24 AM

    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}"

    R 1 Reply Last reply Jan 30, 2018, 10:59 PM Reply Quote 0
    • R
      Russ @dougcolt
      last edited by Jan 30, 2018, 10:59 PM

      @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.

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • D
        DavidSilva
        last edited by DavidSilva Jul 12, 2022, 7:11 AM Jul 12, 2022, 7:10 AM

        Strange, I've read a lot about it on [reddit] and even came across it here, but I've never encountered it before.

        1 Reply Last reply Reply Quote 0
        • A
          aaaaa12345
          last edited by Jul 12, 2022, 8:48 AM

          With AutoHotkey you can try to trigger your Spotify Web? Desktop? client using ACC...
          https://www.autohotkey.com/boards/viewtopic.php?f=6&t=26201&hilit=acc.ahk

          or UIAutomation...
          https://www.autohotkey.com/boards/viewtopic.php?f=6&t=104999

          or COM (quite similar to what you've done already but triggering the elements directly instead of a generic ^{Up}), or...

          Nah, don't do that.

          I've used ACC to skip songs from an already executed playlist within a Spotify browser session once they are "blacklisted".

          Your command would like like this...
          "<path to>\AutoHotkey.exe" "<path to>\myScript.ahk" "1stParam" "2ndParam" "nthParam"

          HTH

          BTW, for a more reliable approach, you can restrict sending "hotkeys" to specific (non-/active) windows.

          1 Reply Last reply Reply Quote 0
          • S
            Sadiethompson
            last edited by Aug 28, 2023, 6:41 AM

            i had the same problem 😞

            R 1 Reply Last reply Aug 28, 2023, 12:10 PM Reply Quote 0
            • R
              Russ @Sadiethompson
              last edited by Aug 28, 2023, 12:10 PM

              @Sadiethompson, can you be more specific? What problem?

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • First post
                Last post