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

    Spotify commands when song is playing

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 5 Posters 2.6k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              Sadiethompson
              last edited by

              i had the same problem 😞

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

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

                Russell VanderMey

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post