Sorry stiggy but that code needs to be optimised.
code:
function CheckForUpdates(foo)
{
var xmlhttpup = new ActiveXObject("MSXML2.ServerXMLHTTP");
xmlhttpup.open("GET", "http://www.msgpluslive.net/scripts/view/309-Myspace-Manager/",true);
xmlhttpup.onreadystatechange=function() {
if (xmlhttpup.readyState==4) {
var ver = RegExp('<span class="largefilename">Myspace Manager(.*)</span><br />','i').exec(xmlhttpup.responseText);
ver = ver[1];
Debug.Trace('Ver On Server: ' + ver + ' - Ver On Disk: ' + MyVer);
if(ver > MyVer){ Toast('New Version Available!\r\n\r\nClick here to download');}
else if(foo){Toast('No New Updates Available!');}
}
}
xmlhttpup.send(null);
}
I'll admit to not testing this before posting but it does look a lot nicer doesn't it?
Anyway, I like to make t ext file and check the build number against the number in there personally, but it wasn't a bad read. I think any of us who do a lot of scripting ill probably use our own methods for this kind of thing but it will definitely be nice for the new scripters to have this functionality as well.