Created
August 20, 2012 16:43
-
-
Save nikcub/3405672 to your computer and use it in GitHub Desktop.
Mute Spotify Ads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Mute Spotify when ads are playing. Use if in a country where you can't | |
--purchase a pro account. Open AppleScript editor (Applications > Utilities) | |
--paste this script in and then go File -> Save As, change 'File Format' to | |
--'Application' and save somewhere. Run Spotify using that application. | |
set currentTrack to "" | |
do shell script "open -a \"Spotify\"" | |
delay 5 | |
repeat while appIsRunning("Spotify") | |
tell application "Spotify" | |
if player state is playing then | |
if get sound volume > 0 then | |
set defVolume to sound volume | |
else | |
set defVolume to 60 | |
end if | |
set currentTrack to current track | |
if currentTrack's name is "Spotify" then | |
set sound volume to 0 | |
else | |
set sound volume to defVolume | |
end if | |
end if | |
end tell | |
delay 2 | |
end repeat | |
on appIsRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end appIsRunning |
Hey, I was super excited when I saw this. Thought it would work but I am afraid it is not working anymore. Have you come up with a new script to block the ads on Spotify?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
spotify got an error: Can’t get «class pPlS». (-1728). Can you help?