Modified GollyJer's script to allow to save or unsave currently playing Spotify song.
Put the images in same folder as the script.
Modified GollyJer's script to allow to save or unsave currently playing Spotify song.
Put the images in same folder as the script.
SearchIcon(IconPath) { | |
ImageSearch FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %IconPath% | |
if (ErrorLevel = 0) { | |
global RealFoundX := FoundX | |
global RealFoundY := FoundY | |
} else if (ErrorLevel = 2) { | |
; MsgBox, , , "Maybe image path is wrong.", 1 | |
} else if (ErrorLevel = 1) { | |
; MsgBox, , , "Can't find heart icon.", 1 | |
} | |
} | |
WinTitle := "ahk_exe spotify.exe" | |
IconOff := A_ScriptDir . "\SpotifyHeartOff.png" | |
IconOn := A_ScriptDir . "\SpotifyHeartOn.png" | |
if WinExist(WinTitle) { | |
MouseGetPos OutputX, OutputY, OutputWin | |
WinActivate %WinTitle% | |
WinWaitActive %WinTitle% | |
SearchIcon(IconOff) | |
SearchIcon(IconOn) | |
if (RealFoundX > 0 and RealFoundY > 0) | |
Click %RealFoundX%, %RealFoundY% | |
WinActivate ahk_id %OutputWin% | |
MouseMove %OutputX%, %OutputY% | |
} |
@Zivers88, yeah Spotify changed their heart icon, so I updated them, you can download the new images above.
Hi! How can I use it? It is Not working at all