so I've recently come across a skin that displays the current track playing in Spotify (music streaming program).
My problem is that I want the skin to be hidden by default and only show either when Spotify is running or when a track is actually playing, preferably the latter.
The string returned seems to be "0" when Spotify isn't running and "Spotify" when no track is playing.
Assuming the above is true, the following will work in theory.
Just add this code in the skin anywhere, preferably the top. DO NOT EDIT THE MEASURETRACK, as I do not know if its substituted values serve any function somewhere else in the skin.
Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive.
Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
However, it seems like the calculation is a bit wrong. The skin fades out and back again regardless if a track is playing or if Spotify is/isn't running.
Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive.
Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
Try the following. I messed up. Any "Text" will get treated as a 0 by a calc, so even if music was playing, it would still be a 0. Now if music is playing its a 0, but if Spotify is paused then its a -1.
Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive.
Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
So here is my thought on why it doesn't work, however I'm new to all this and haven't played around with it enough to even get a vague understanding of it all.
The string being returned when:
Spotify is running and playing a track is: Spotify - [Artist] - [Track] Spotify is paused is: Spotify Spotify isn't running is: 0 (need to refresh to see the 0)
When a measure is taken it is done in regards to its WindowClass, am I right? (at least when Measure=Plugin)
If a measure on a WindowClass fails because the WindowClass isn't running, does it return a value of "0" then? In other words is it still a usable value or is it just a text string?
Lol... my writing proves that im tired... I dont know wth i was thinking
Okay, this should now work. If the plugin fails (0), spotify is paused (0), spotify is stopped (0), or spotify isnt doing anything (0), then it will return a 0, and fire the bang.
If spotify is playing then Spotify - becomes 1, and any text after that becomes 0, which makes 10, and thats above 0 if its converted number. There will be a 2 second delay just to let you know.
Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive.
Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.