Macro to stop a looping PlaySound macro?

I recently found out how to get an old macro of mine working:
/script PlaySound(23406)
This just plays the goblin hotrod radio from the starting zone. However, my old macro which would STOP looping music does not seem to make it stop:
/run StopMusic()
I tried variants of StopSound and StopSoundFile, none seemed to work.
If anyone knows how to make a soundfile STOP once it has been called to play, I would be very much appreciated. For now my only solution seems to be to relog each time.

/run BlastenboomSoundHandle = select(2, PlaySound(23406))

/run StopSound(BlastenboomSoundHandle)

1 Like

Thank you so much! Works like a charm!

I can’t get this to work for me. Here is my macro:

#showtooltip Drain Soul
/cast Drain Soul
/script PlaySound(68878)
/script PlaySound(68710)
/run MorcinunSoundHandle = select(2, PlaySound(68710))
/run StopSound(MorcinunSoundHandle)

It has an impact sound and a loop sound. I’m trying to get the loop sound (void torrent) to stop looping when I stop casting Drain Soul. Any ideas? Thanks!

You can’t do that with a simple macro. You’ll need something to listen for when you stop casting DS or you’ll need to attach the stop command to a separate macro.