I saw that some tried to arrange so that the sound mutes when advertising was running. however, some works not when minimized to tray. or for other it may not work in vista but this will work! (at least for me, wich use vista)
this script set mute on and off in spotify in which windowed mode any time
it effect's on titel of spotify
it also show the song's name in tooltip
could as well add that opertunity while I still keep checking the title for advertising
Code:
OnMessage(0x200,"MoveWindow")
#Persistent
DetectHiddenWindows, On
SetTitleMatchMode 2
WinGetTitle, Playing, ahk_class SpotifyMainWindow
WinGetTitle, LastSong, ahk_class SpotifyMainWindow
Mute = Off
SetTimer, CheckSong, 500
CheckSong:
WinGetTitle, Playing, ahk_class SpotifyMainWindow
if Playing != %LastSong%
{ StringTrimLeft, Playing, Playing, 10
ToolTip, %Playing%
SetTimer, RemoveToolTip, 1500
if Mute = On
{
ControlSend, ahk_parent, ^+{Down}, ahk_class SpotifyMainWindow
Mute = Off
}
if Playing = Spotify - Spotify – Spotify Premium
{
ControlSend, ahk_parent, ^+{Down}, ahk_class SpotifyMainWindow
Mute = On
}
}
WinGetTitle, LastSong, ahk_class SpotifyMainWindow
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return