xuanmai Posted October 4, 2008 Share Posted October 4, 2008 for example, how do I want to use PlaySound function in the library winmm.dll no one Link to comment Share on other sites More sharing options...
Andreik Posted October 4, 2008 Share Posted October 4, 2008 for example, how do I want to use PlaySound function in the library winmm.dll I write an example: $SND_SYNC = 0x0000 ;// play synchronously (default) $SND_ASYNC = 0x0001 ;// play asynchronously $SND_NODEFAULT = 0x0002 ;// silence (!default) if sound not found $SND_MEMORY = 0x0004 ;// pszSound points to a memory file $SND_LOOP = 0x0008 ;// loop the sound until next sndPlaySound $SND_NOSTOP = 0x0010 ;// don't stop any currently playing sound $SND_NOWAIT = 0x2000;// don't wait if the driver is busy Func PlaySound($FILENAME,$MODE) DllCall("winmm.dll","int","PlaySound","str",$FILENAME,"int",0,"uint",$MODE) EndFunc PlaySound(@ScriptDir & "\Ferrari.wav",$SND_SYNC) but exists functions in Autoit (search in help file about SoundPlay and _SoundPlay). When the words fail... music speaks. Link to comment Share on other sites More sharing options...
xuanmai Posted October 4, 2008 Author Share Posted October 4, 2008 $SND_SYNC = 0x0000;// play synchronously (default) $SND_ASYNC = 0x0001;// play asynchronously $SND_NODEFAULT = 0x0002;// silence (!default) if sound not found $SND_MEMORY = 0x0004;// pszSound points to a memory file $SND_LOOP = 0x0008;// loop the sound until next sndPlaySound $SND_NOSTOP = 0x0010;// don't stop any currently playing sound $SND_NOWAIT = 0x2000;// don't wait if the driver is busy Func PlaySound($FILENAME,$MODE) DllCall("winmm.dll","int","PlaySound","str",$FILENAME,"int",0,"uint",$MODE) EndFunc PlaySound(@ScriptDir & "C:\WINDOWS\MEDIA\TADA.wav",$SND_SYNC) I was able to transfer from your code, but I can not be called "C: \ WINDOWS \ MEDIA \ TADA.wav"here is 1 songs available in the windowwhy??? no one Link to comment Share on other sites More sharing options...
Andreik Posted October 4, 2008 Share Posted October 4, 2008 $SND_SYNC = 0x0000;// play synchronously (default) $SND_ASYNC = 0x0001;// play asynchronously $SND_NODEFAULT = 0x0002;// silence (!default) if sound not found $SND_MEMORY = 0x0004;// pszSound points to a memory file $SND_LOOP = 0x0008;// loop the sound until next sndPlaySound $SND_NOSTOP = 0x0010;// don't stop any currently playing sound $SND_NOWAIT = 0x2000;// don't wait if the driver is busy Func PlaySound($FILENAME,$MODE) DllCall("winmm.dll","int","PlaySound","str",$FILENAME,"int",0,"uint",$MODE) EndFunc PlaySound("C:\WINDOWS\MEDIA\TADA.wav",$SND_SYNC) Read in help file about @ScriptDir. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
xuanmai Posted October 4, 2008 Author Share Posted October 4, 2008 thank you no one Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now