How can I replay a music track many times? (or until toggled)

I have a 10-minute white noise track I'd like to repeat over and over, so it restarts as soon as it gets to the end.

I haven't been successful having the macro toggle the Apple Music app's Controls>Repeat menu, so I' wondering if Keyboard Maestro could do the repeating itself. I've tried following the Play Track action with the Previous Track action, but, of course, it doesn't wait for the playing track to finish before it does the previous track action.



You could use KM's Play Sound action in conjunction with a Repeat loop, but if the track is already in the Music app, you could also use a little AppleScript to set the track to repeat:

Example Macro.kmmacros (1.7 KB)

1 Like

Thanks. It's exactly what I needed. I've also read I could put the track in its own playlist, and us AppleScript to call that, but I didn't want to junk up my playlists with a one-song-list, so this is perfect--and simple!

1 Like