Morteza Posted October 17, 2008 Posted October 17, 2008 It will be very nice if every time a script is executed, a MIDI file be played at background. I want use windows winmm.dll for this aim. Is this possible with AutoIT3? Thanks beforehand
i542 Posted October 17, 2008 Posted October 17, 2008 There is DLLCall function, try using it. I can do signature me.
Morteza Posted October 17, 2008 Author Posted October 17, 2008 There is DLLCall function, try using it. Thanks for answer. I used it, but MIDI files are not played to the end! No problem with other music files, just with MIDI files. Another problems is that I didn't know how to repeat the playing. My sample code was: $MIDFile = "a.mid" DllCall( "winmm.dll", "int", "mciExecute", "str", "play " & $MIDFile) Sleep(5700) any help?
i542 Posted October 18, 2008 Posted October 18, 2008 (edited) Thanks for answer. I used it, but MIDI files are not played to the end! No problem with other music files, just with MIDI files. Another problems is that I didn't know how to repeat the playing. My sample code was: $MIDFile = "a.mid" DllCall( "winmm.dll", "int", "mciExecute", "str", "play " & $MIDFile) Sleep(5700) any help?:/ Wasn't playing with the dll... but... I guess the script ends as the time music ends? HotKeySet("{ESC}", "_Exit") $MIDFile = "a.mid" DllCall( "winmm.dll", "int", "mciExecute", "str", "play " & $MIDFile) While 1 Sleep(1) WEnd Function _Exit() Exit EndFunc <Not tested, press ESC to exit> Edited October 18, 2008 by i542 I can do signature me.
Morteza Posted October 18, 2008 Author Posted October 18, 2008 Search on forum about MidiUDF.au3I was searched the forum before my post for three days The MidiUDF.au3 is for working with MIDI Devices & MIDI notes, not for playing MIDI files. BTW, thanks for your answer.
Morteza Posted October 18, 2008 Author Posted October 18, 2008 (...) I guess the script ends as the time music ends? (...)No, the script will be executed even after the music time is ended. Execution will be ends just after pressing ESC hotkey.And there is another important problem too. I will the music be played at beckground repeatedly, but with the code, the MIDI file is played once and script is not executed during music playing.Regards
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