Champak Posted February 14, 2008 Share Posted February 14, 2008 I've given up trying to manipulate WMP so I've decided to just make my own player using WMPlayer object and grab WMP playlist. Playlist problem: Advance to the next song: During playing of a playlist I can't get the song to go to the next song when the current one is finished. If I try to do If $oPlayer.controls.currentPosition() = $oPlayer.currentMedia.duration() Then, that will fail sometimes do to loop timing. If I do If $oPlayer.controls.currentPosition() = 0 because the song resets at the end, that will cause me to skip to the next song every time I press STOP. I cant seem to get MediaEnded to work. So Im stuck. How do I advance to the next song in an array playlist at the end of a song? Formatting problem: Also, how do I convert $oPlayer.controls.currentPosition() and $oPlayer.currentMedia.duration() to minutes and seconds instead of just seconds? Thanks Link to comment Share on other sites More sharing options...
Champak Posted February 14, 2008 Author Share Posted February 14, 2008 Also, is there a way to detect if there is/isn't a current media? I'm getting errors in certain functions I want to make, and I have to make a bunch of cumbersome workarounds. So basically what I want to do is something like "IF $oPlayer.currentMedia exists" Link to comment Share on other sites More sharing options...
Champak Posted February 14, 2008 Author Share Posted February 14, 2008 (edited) OK, resolved all issues, just posting solution if anyone else has the problem.Skip to the next song in the playlist:My original idea concept was on the right track, but didn't work, I believe, because I didn't have both duration and current time rounded and formatted. Well I formatted and rounded both times and it works as expected. That being, I put: "If currentpositon = duration Then". I put that at the end of the While1 loop. However this does fail occasionally, especially if the computer hickups; so a better solution would be appreciated.Time format:http://www.autoitscript.com/forum/index.ph...post&p=2970If currentmedia exists:I didn't find an answer to this, instead what I did is just on start up load the previously called playlist and auto play. This works great, but I'd still like an answer if this is possible or not. Edited February 14, 2008 by Champak Link to comment Share on other sites More sharing options...
Champak Posted February 20, 2008 Author Share Posted February 20, 2008 Bump, Still looking for an answer for something that will do an If currentmedia exists. 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