Fast Soundplay function not working?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
scriptomundo
Posts: 44
Joined: 08 Nov 2021, 23:40

Fast Soundplay function not working?

Post by scriptomundo » 14 Aug 2022, 18:01

Hi all, can anybody tell me if they successfully use this function on Windows 11?

Code: Select all

soundfile1=%systemroot%\Media\crucial.wav
fileread,crucialsound,c* %soundfile1%
playsound(crucialsound)
msgbox sound finished playing
return

PlaySound(sndPointer) {
	SoundSet, +1, MASTER, mute,10
	DllCall("winmm.dll\PlaySound","uint",&sndPointer,"uint",0,"uint",0x5) ;plays sound from memory, SND_MEMORY = 0x4, SND_ASYNC = 0x1  ( 4 | 1 = 5)
}
I've tried multiple sound files and checked volume is on, but still not sure why nothing is playing for me.

Thanks!

Return to “Ask for Help (v1)”