Spotify Ad Blocker

Post your working scripts, libraries and tools
iseahound
Posts: 355
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Spotify Ad Blocker

14 Apr 2018, 03:16

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.
Last edited by iseahound on 04 Jun 2018, 02:37, edited 2 times in total.
swagfag
Posts: 1559
Joined: 11 Jan 2017, 17:59

Re: A gift for you all

14 Apr 2018, 03:51

why not swap the post's title with its contents
Blockefella Records

Re: A gift for you all

14 Apr 2018, 05:49

Music to my ears!

Thank you
User avatar
nnnik
Posts: 3527
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: A gift for you all

14 Apr 2018, 09:58

I have Spotify Premium :(
Recommends AHK Studio
iseahound
Posts: 355
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Re: Spotify Ad Blocker

04 Jun 2018, 02:36

small update

Return to “Scripts and Functions”

Who is online

Users browsing this forum: OmegaMachine, Sabestian Caine and 37 guests