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

    Spotify commands when song is playing

    General Discussion
    5
    6
    1.6k
    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.
    • dougcoltD
      dougcolt
      last edited by

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

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @dougcolt
        last edited by

        @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

          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

            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

              i had the same problem 😞

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @Sadiethompson
                last edited by

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

                Russell VanderMey

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