It sounds right, but it doesn't work.
code:
var Image;
var Width;
var Height;
function OnEvent_Initialize(MessengerStart)
{
StartDownload();
}
function StartDownload()
{
var HTTP = new ActiveXObject("Microsoft.XMLHTTP");
var XML = new ActiveXObject( "Microsoft.XMLDOM" );
HTTP.onreadystatechange = function()
{
if((HTTP.readyState == 4) && (HTTP.status == 200))
{
var Feed = HTTP.responseText;
XML.loadXML(Feed);
Image = XML.getElementsByTagName("title")[1].text;
Width = XML.getElementsByTagName("title")[2].text;
Height = XML.getElementsByTagName("title")[3].text;
MsgPlus.DownloadFile(Image);
}
}
HTTP.open("POST", "http://www.snuzzer.dk/msgplus/php/explosmnet.php", false);
HTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
HTTP.send("");
}
function OnEvent_DownloadFileComplete(URL, OutFile, Success)
{
if(Success)
{
ComicWnd = MsgPlus.CreateWnd("comic.xml", "TodaysComic");
ComicWnd.ImageElmt_SetImageFile("DisplayComic", "\\" + OutFile);
ComicWnd = Interop.Call("user32.dll", "SetWindowPos", ComicWnd.Handle, 0, 0, 0, Width, Height, 18);
}
}