quote:
Originally posted by CookieRevised
With the Run function you start up an application. Most applications can take parameters and depending on what parameters you enter it does different stuff.
This is no different for WMP. What you do with the Run function is the same as what you do when you manually start a sound or playlist in Windows Explorer. In that case Windows will also start up WMP with a parameter, being the playlist for example.
What you also can do is starting up the playlist itself instead of starting up the WMP application. Windows will then automatically start that file with the associated application, which is in this case WMP. This is your best method for something like this because then you don't need to worry about the correct parameters (which can be quite different than just adding the filename to the command line) and Windows will handle all the rest for you.
So instead of Run("c:\wmplayer.exe") you do Run("c:\myplaylist.wpl"). The script should of course handle the randomness itself and needs a list (or directory) to choose the list from.
Thanks cookie, very useful as usual
Why doesn't this code work then?
code:
function OnEvent_Signin(){
new ActiveXObject('WScript.Shell').Run("\"C:\\Documents and Settings\\James Ross\\My Documents\\My Music\My Playlists\\Untitled Playlist.wpl\\"");
}