eyeball Posted January 15, 2007 Share Posted January 15, 2007 Hi all,does anyone know of a program that can randomly select music from a directory and burn it to a cd? or at least create me a burnable image?thanks Link to comment Share on other sites More sharing options...
Marthax Posted January 16, 2007 Share Posted January 16, 2007 Hm..what comes a cross my mind when reading your question is WMP. Create a playlist and shuffle it and then burn. Simple enough and it does achieve what you want, a randomized CD. Link to comment Share on other sites More sharing options...
eyeball Posted January 16, 2007 Author Share Posted January 16, 2007 (edited) thats a good suggestion but WMP doesnt know where the end of the cd is and you can't ask it to select 80 minutes worth of music (can you?) would be nice if i could do it with media player. or does anyone else know of another program? Edited January 16, 2007 by eyeball Link to comment Share on other sites More sharing options...
Marthax Posted January 16, 2007 Share Posted January 16, 2007 Eh, yes it can. What WMP are you using? Link to comment Share on other sites More sharing options...
eyeball Posted January 16, 2007 Author Share Posted January 16, 2007 im using windows media player 11, if you can tell me how to do this that would be fantastic Link to comment Share on other sites More sharing options...
gunsmokingman Posted January 17, 2007 Share Posted January 17, 2007 im using windows media player 11, if you can tell me how to do this that would be fantastic Go to this How To Scripts For WMP to see if this can help you Link to comment Share on other sites More sharing options...
eyeball Posted January 17, 2007 Author Share Posted January 17, 2007 thanks for the link GSM, im so out of touch with vb atm, but ill read it, it looks interestingthanks! Link to comment Share on other sites More sharing options...
gunsmokingman Posted January 18, 2007 Share Posted January 18, 2007 (edited) Here is a demo script that list what been added to the WMP playlist.This will add both MP3 and WMA to the WMP playlist.Save As AddToWmp.vbsstrComputer = "." Dim Act : Set Act = CreateObject("Wscript.Shell") Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") Dim Wmp : Set Wmp = CreateObject("WMPlayer.OCX" ) Dim Wmi : Set Wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer& "\root\cimv2") Dim Media : Set Media = Wmp.mediaCollection Dim Txt : Txt = Act.ExpandEnvironmentStrings("%UserProfile%\desktop\") Dim AddSong, Cnt, Ext, F3, F4, GetF, MB, Music, ObjFile, TS F4 = Chr(160) & Chr(187) & Chr(160) MB = 1024 * 1024'-> Searches For MP3 FindMP3() Function FindMP3() Ext="MP3" StartFileList() Set Music = Wmi.ExecQuery("Select * from CIM_DataFile Where Extension = 'MP3'") For Each ObjFile In Music Set AddSong = Media.Add(ObjFile.Name) MkRptMusic() Next RptCount() Cnt =0 Exit Function End Function'-> Searches For WMA FindWMA() Function FindWMA() Ext="WMA" StartFileList() Set Music = Wmi.ExecQuery("Select * from CIM_DataFile Where Extension = 'WMA'") For Each ObjFile In Music Set AddSong = Media.Add(ObjFile.Name) MkRptMusic() Next RptCount() Cnt =0 Exit Function End Function '-> Counts How Many MP3 Or WMA Have Been Added Function CountMusic() If Music.Count = 0 Then '-> If There Is No MP3 Or WMA Else Cnt = Cnt + 1 If Cnt > 99 Then Cnt = Cnt ElseIf Cnt = 99 Then Cnt = "0" & Cnt ElseIf Cnt > 9 Then Cnt = "0" & Cnt ElseIf Cnt = 9 Then Cnt = "00" & Cnt ElseIf Cnt < 9 Then Cnt = "00" & Cnt End If End If Exit Function End Function '-> List What Been Added To Playlist Function MkRptMusic() CountMusic() F3 = Fso.GetFolder(Fso.GetParentFolderName(ObjFile.Name)) Set GetF = Fso.GetFile(ObjFile.Name) Set TS = Fso.OpenTextFile(Txt & Ext &"_List.txt",8) TS.WriteLine F4 & Ext & " Path" & F4 & F3 TS.WriteLine F4 & Cnt & "\" & Ext TS.WriteLine F4 & Ext & " Name" & F4 & GetF.Name TS.WriteLine F4 & Ext & " Size" & F4 & Left(Round(GetF.Size /MB,5),5) & " MB" & vbCrLf TS.Close() Exit Function End Function '-> Reports How Many MP3 Or WMA Function RptCount() MsgBox F4 & "Music File Count " & F4 & Music.Count,4128, Ext & " Total" Set TS = Fso.OpenTextFile(Txt & Ext &"_List.txt",8) TS.WriteLine F4 & "End Time " & F4 & Now() & vbCrLf TS.Close() Exit Function End Function '-> Start The Text Output Function StartFileList() Set TS = Fso.CreateTextFile(Txt & Ext &"_List.txt") TS.WriteLine F4 & "Start Time" & F4 & Now() & vbCrLf TS.Close() Exit Function End Function'-> Delete The VBS File Fso.DeleteFile(Fso.GetFile(WScript.ScriptFullName))Here Is A SFX file of the above Script Edited February 10, 2007 by gunsmokingman 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