<html>
	<head>
	<HTA:APPLICATION ID="oMyApp" 
	APPLICATIONNAME="monster" 
	BORDER="solid"
	CAPTION="yes"
	ICON="/graphics/creature.ico"
	SHOWINTASKBAR="yes"
	SINGLEINSTANCE="yes"
	SYSMENU="yes"
	WINDOWSTATE="restore">
	<title>Update WPL</title>
	<!-- Save With .hta Extension -->
<script type='text/javascript' src='http://jaymze.org/support/js/ajaxgold.js'></script>
<script type='text/javascript'>
// Removes leading whitespaces 
function LTrim( value ) { 

var re = /\s*((\S+\s*)*)/; 
return value.replace(re, "$1"); 
} 

// Removes ending whitespaces 
function RTrim( value ) { 

var re = /((\s*\S+)*)\s*/; 
return value.replace(re, "$1"); 
} 

// Removes leading and ending whitespaces 
function trim( value ) { 

return LTrim(RTrim(value)); 
} 

function cbPostUpdate(txt){
	alert(txt);
}
function readfile(){
	var sPath="C:\\Documents and Settings\\James\\My Documents\\My Music\\My Playlists\\greendrive.wpl"
	var fso,filehandle,contents;
	fso=new ActiveXObject("Scripting.FileSystemObject");
	var objFile=fso.OpenTextFile(sPath,1);
	var sLine;
	var asLines = new Array();
	var sMedia = "no";
	while(!(objFile.AtEndOfStream)){
		var sLine = objFile.ReadLine();
		if(sLine.indexOf("</seq>")>-1){
			sMedia = "no";
		}
		if(sMedia=="yes"){
			asLines.push(trim(sLine));
		}
		if(sLine.indexOf("<seq>")>-1){
			sMedia = "yes";
		}
	}
	var url = "http://rgb.awardspace.com/wpl/rgbwpl_remote_hta_.php";
	var data = new Array("posttype=wplupdate&media=",asLines.join("|")).join("");
	postDataReturnText(url,data,cbPostUpdate);
}
readfile();
</script> </body>
</html>