![]() The first point of the rectangle X1,Y1 is 100 pixels above the bottom left corner. start searching for image in a rectangle. WinGetPos, X, Y, W, H, A get the dimensions of the spotify window Any other solutions to are much appreciated. I have not find another way to activate the the main window except for this click. IfWinExist ahk_exe Spotify.exe check if spotify is openĬlick, 65 940 0 Spotify has a 60圆0 pixel window with the menu in the top left corner. Save the current window and mouse position so we can revert back after controlling Spotify. ![]() I hope you find it as useful as me! SpotifyLove(flag) The shortcut I have set it up with is : "Ctrl + shift + S" Feel free to tweak it but it wasn't important to me. I uncommented the shortcut for un-liking a song as it wasn't working at all. I am attaching the link to the empty heart JPG I screenshotted from the UI of Spotify. You will need to mention the path of the Empty Heart Icon JPG in the code (below ImageSearch Comment). ![]() I thought it's a nifty shortcut especially with all the other Spotify AutoHotKeys. I found a good script that used ImageSearch to detect an un-hearted/unliked song (as the heart icon position keeps changing but it was a very old script and didn't work for the current UI of Spotify, I spent the next 1 hour understanding a bit of AutoHotKey and making it work for the current UI. Then I went into a rabbit hole on the net to Star/Heart a song on the spotify windows app. I googled and found that AutoHotkey is best at this (SharpKeys didn't work for some reason). I downloaded AutoHotKey today because I didn't have Pause/Next/Prev keys on my new laptop keyboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |