1.

Solve : How to make a batch file play a playlist?

Answer»

i wanna know how to make a batch file play a playlistBatch files do not do Windows. :-/

Code: [Select]
SET objPlayer = CreateObject("WMPlayer.OCX" )

Set objPlaylists = objPlayer.MediaCollection
Set objAll = objPlaylists.getByName("PlayListName")
Set objList = objAll.Item(0)

objPlayer.OpenPlayer(objList.sourceURL)


Save with a vbs extension. If it makes you FEEL better run from the command LINE (like a batch file) as cscript scriptname.vbs. You can also run from the Windows Run box as scriptname.vbs or wscript scriptname.vbs

Note: Change PlayListName to SOMETHING valid. This works for WMP 10; for older versions you may have to change the first line to WMPlayer.ocx.7

Hope this helps. thanks very much it workedI have seen this thing working with batch files.

Let me dig them out I've done something similar USING a batch file i simply used something like this:

File: playthelist.bat
Contents:

@echo off
set thelist=Playlist.ext
explorer.exe %thelist%

replace Playlist.ext with you playlist file in my case it was DSF.wpl so it would look like so:

@echo off
set thelist=DSF.wpl
explorer.exe %thelist%You can use the START command.

Example:
Code: [Select]start "C:\Documents and Settings\Random Dude\My Documents\Playlist.wpl"



Discussion

No Comment Found