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
repeat | |
tell application "System Events" to delay 3.0 | |
tell application "System Events" to set currentApp to name of first process where frontmost is true | |
if currentApp is "Spotify" then | |
try | |
-- Create a random number to do one of three things | |
set randomNum to random number from 1 to 3 | |
if randomNum is 1 then | |
tell application "Spotify" to pause |