Page 1 of 1

Spotify Ad Blocker

Posted: 14 Apr 2018, 03:16
by iseahound

Code: Select all

#singleinstance force
;#include <window>

SetTimer, #+a, 1000

#+a::
WinGet, _windows, List
Loop % _windows {
   _hwnd := _windows%A_Index%
   WinGet, _process, ProcessName, ahk_id %_hwnd%
   WinGetTitle, _title, ahk_id %_hwnd%
} until (_process == "Spotify.exe" && _title != "")
if (_process == "Spotify.exe") && !((_title ~= "-") || (_title = "spotify")) {
   PostMessage, 0x112, 0xF060,,, ahk_id %_hwnd%
   while ProcessExist("Spotify.exe")
      Sleep 10
   Run, YOUR PATH TO SPOTIFY.EXE \Spotify.exe --minimized
   WinWait, ahk_exe Spotify.exe
   Sleep 7000
   Send, {Media_Play_Pause}
   ;Focus("recent")
}
return

ProcessExist(Name){
   Process,Exist,%Name%
   return Errorlevel
}
This code blocks ads on Spotify. It is provided as-is and confirmed working as of 2018-06-04.

Re: A gift for you all

Posted: 14 Apr 2018, 03:51
by swagfag
why not swap the post's title with its contents

Re: A gift for you all

Posted: 14 Apr 2018, 05:49
by Blockefella Records
Music to my ears!

Thank you

Re: A gift for you all

Posted: 14 Apr 2018, 09:58
by nnnik
I have Spotify Premium :(

Re: Spotify Ad Blocker

Posted: 04 Jun 2018, 02:36
by iseahound
small update