mwillberg
4th February 2002, 14:43
I don't know if this is the right forum for this post, but here goes:
I created a small script-file that creates an asx-file for clips when you drag-and-drop them on it. After that it starts up ZoomPlayer with the file as a parameter. I use it for quickly generating temporary playlist for movies that are on my harddrive.
A small WARNING: this script _will_ overwrite any file that you point it to, no checking is performed (obviously, since it uses the same file every time).
ForWriting = 2;
filename = "d:\\temp.asx";
var clipNames = WScript.Arguments;
var ws = WScript.CreateObject("WScript.Shell");
if(clipNames.Length<2)
ws.PopUp("Usage: Drag the correctly sorted clips and drop them on the script.",0,"Less than two files.",0);
else
{
var fs = new ActiveXObject("Scripting.FileSystemObject");
var file = fs.OpenTextFile(filename, ForWriting, "True");
file.WriteLine("<Asx Version = \"3.0\" >");
for(i=0; i<clipNames.Length; i++)
{
file.WriteLine("<Entry>");
file.WriteLine("<Ref href = \""+clipNames.Item(i)+"\"/>");
file.WriteLine("</Entry>");
}
file.WriteLine("</Asx>");
file.Close();
ws.Run("\"C:\\Program Files\\Video\\Players\\Zoom Player\\zplayer.exe\""+filename);
}
Just paste this into notepad, replace the paths to point to the file you want to create and to your player, and save it as .js (for example playlist.js). Then it should work.
Note: The files will be played in the same order that they are sorted in the explorer-window, with one exception. When you have selected all your files, you will need to start the "drag" from the first file, because the file that you "hold on to" while dragging will be placed first.
Like I said, I created this for my own use, but if anyone else finds it useful then the time taken to write this post is justified. The sourcecode is released under GPL. ;)
Thanks to TheWEF, I learned the syntax of asx-files from GKnot.
I created a small script-file that creates an asx-file for clips when you drag-and-drop them on it. After that it starts up ZoomPlayer with the file as a parameter. I use it for quickly generating temporary playlist for movies that are on my harddrive.
A small WARNING: this script _will_ overwrite any file that you point it to, no checking is performed (obviously, since it uses the same file every time).
ForWriting = 2;
filename = "d:\\temp.asx";
var clipNames = WScript.Arguments;
var ws = WScript.CreateObject("WScript.Shell");
if(clipNames.Length<2)
ws.PopUp("Usage: Drag the correctly sorted clips and drop them on the script.",0,"Less than two files.",0);
else
{
var fs = new ActiveXObject("Scripting.FileSystemObject");
var file = fs.OpenTextFile(filename, ForWriting, "True");
file.WriteLine("<Asx Version = \"3.0\" >");
for(i=0; i<clipNames.Length; i++)
{
file.WriteLine("<Entry>");
file.WriteLine("<Ref href = \""+clipNames.Item(i)+"\"/>");
file.WriteLine("</Entry>");
}
file.WriteLine("</Asx>");
file.Close();
ws.Run("\"C:\\Program Files\\Video\\Players\\Zoom Player\\zplayer.exe\""+filename);
}
Just paste this into notepad, replace the paths to point to the file you want to create and to your player, and save it as .js (for example playlist.js). Then it should work.
Note: The files will be played in the same order that they are sorted in the explorer-window, with one exception. When you have selected all your files, you will need to start the "drag" from the first file, because the file that you "hold on to" while dragging will be placed first.
Like I said, I created this for my own use, but if anyone else finds it useful then the time taken to write this post is justified. The sourcecode is released under GPL. ;)
Thanks to TheWEF, I learned the syntax of asx-files from GKnot.