I know that there is AHK solution for Spotify app, but nothing for web player.
I'm using Spotify web player for Firefox, because standalone app is not working for countries where Spotify is not officially launched, but webplayer works fine. There is addon which allows to use media keys (play/pause/prev/next) in Firefox so all I need is 'Save to Favorites' hotkey.
CSS Class name for not yet added song is .spoticon-heart-16
For the added it is .spoticon-heart-active-16
So the goal is to press the add song button when hotkey is pressed if the class shows that it's not yet added, and ignore hotkey otherwise.
Thank you.
Spotify Web - Save to Favorites Hotkey
Re: Spotify Web - Save to Favorites Hotkey
I made this script which clicks a button in my browser (with spotify web player) without any checks:
In this example I'm clicking on Play button, because it's always on its place unlike the "Save to your Favorite Songs" heart-shaped button, which is not only changing its color, but also is changing position depending on length of a song title and playing mode.
The color code of the button when it shouldn't be pressed:
1ED760 (Red=1E Green=D7 Blue=60)
So the goal is that script should check the color of the button and adjust to its changing positions.
Code: Select all
^!Up:: ControlClick, x969 y992, spotify, , Left, 1, NA
The color code of the button when it shouldn't be pressed:
1ED760 (Red=1E Green=D7 Blue=60)
So the goal is that script should check the color of the button and adjust to its changing positions.
Last edited by ahkfan on 23 Jul 2018, 15:20, edited 1 time in total.
Re: Spotify Web - Save to Favorites Hotkey
I removed the song titles using an addon to edit CSS styles. The "Save to your Favorite Songs" button is no longer moving.
So the only thing, that's left is to check if the color is 1ED760. If it is - don't press.
Any ideas on how to do it, could you please help, guys?
So the only thing, that's left is to check if the color is 1ED760. If it is - don't press.
Any ideas on how to do it, could you please help, guys?
Who is online
Users browsing this forum: Google [Bot] and 324 guests