Jump to content
Sign in to follow this  
LarryDalooza

Play WAV Resource

Recommended Posts

LarryDalooza

Download Scite install. Add ResHacker.exe to the Scite\AutoIt3Wrapper folder. Use Scite's "Tool" menu to compile this...

#AutoIt3Wrapper_Res_File_Add=C:\WINDOWS\Media\tada.wav,SOUND,MYWAVE

Global Const $SND_RESOURCE = 0x00040004
Global Const $SND_ASYNC = 1

DllCall("winmm.dll","int","PlaySound","str","MYWAVE","hwnd",0,"int",$SND_RESOURCE)

DllCall("winmm.dll","int","PlaySound","str","MYWAVE","hwnd",0,"int",BitOr($SND_RESOURCE,$SND_ASYNC))
For $n = 1 to 100
    Sleep(15)
    ToolTip("Asynch! " & $n)
Next

Off the top of my head. No sound card in my dev pc at work.

Hope it works...

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
LarryDalooza

For mp3 you may be able to use the resource with MCISendString() in winmm.dll

any volunteers to do this?

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
LarryDalooza

For mp3 you may be able to use the resource with MCISendString() in winmm.dll

any volunteers to do this?

Lar.

OK.. this is a a stupid idea, and a virtual "no go" without an interim temp file.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
GtaSpider

Hello

Very very nice, thnanks For sharing Larry! Bad, that it doesnt work for mp3 :)

Mfg / Best Regards Spider


www.AutoIt.de - Moderator of the German AutoIt Froum

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.