poisonkiller Posted December 6, 2005 Share Posted December 6, 2005 When i rune this script: DllCall("winmm.dll", "int", "mciSendString", "str", "open somesong.mp3" & " alias playMe", "str", "", "int", 65534, "hwnd", 0) DllCall("winmm.dll", "int", "mciSendString", "str", "seek playMe to -1", "str", "", "int", 65534, "hwnd", 0) Do $mode = DllCall("winmm.dll", "int", "mciSendString", "str", "status playMe mode", "str", "", "int", 65534, "hwnd", 0) Until $mode[2] = "stopped" or $mode[2] = "paused" Then comes this error: This program has performed an illegal operation and will be shut down. If the problem persists, contact the program vendor. What im doing wrong?? Link to comment Share on other sites More sharing options...
AutoIT Geek Posted December 6, 2005 Share Posted December 6, 2005 1st. "str", "" - are you tring to send NULL ? DLLCALL() dont understand this, use "int", 0 2nd. "hwnd", 0 - DLLCALL() dont understand this too, try "hwnd", "" or "int", 0 Link to comment Share on other sites More sharing options...
poisonkiller Posted December 6, 2005 Author Share Posted December 6, 2005 I tryed this now, but its not playing song... Link to comment Share on other sites More sharing options...
AutoIT Geek Posted December 6, 2005 Share Posted December 6, 2005 I tryed this now, but its not playing song...have you red the MSDN page ? if not, the read it, carfulyhttp://msdn.microsoft.com/library/default....isendstring.aspif you did, post your entire code and hope for the best Link to comment Share on other sites More sharing options...
odklizec Posted December 6, 2005 Share Posted December 6, 2005 (edited) try this.. ; using MCI close before new MCI open is a good practice! DllCall("winmm.dll", "int", "mciSendString", "str", "close mpegvideo", "str","", "int", 65534, "int", 0) DllCall("winmm.dll", "int", "mciSendString", "str", "open ""c:\_\audio\file.mp3"" type mpegvideo alias playMe", "str", "", "int", 65534, "int", 0) DllCall("winmm.dll", "int", "mciSendString", "str", "play playMe from 0", "str", "", "int", 65534, "int", 0) Do $mode = DllCall("winmm.dll", "int", "mciSendString", "str", "status playMe mode", "str", "", "int", 65534, "int", 0) ; use small amount of Sleep to make the script less CPU intensive;) Sleep(100) Until $mode[2] = "stopped" or $mode[2] = "paused" Edited December 6, 2005 by odklizec 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