Oh, yes.. Embarrassing. But I'm also wondering how to find the path and put it into my .xml file.
EDIT: Seems like the path is just
OutFile in
OnEvent_DownloadFileComplete()
I have looked on the forums, but I can't find out how to solve my problem. I have tried this:
This is my script:
code:
var DownloadComic = "http://www.explosm.net/db/files/Comics/Matt/ive-got-some-homemade-stuff-for-that-wound-of-yours-too.png";
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.DownloadFile(DownloadComic);
}
function OnEvent_DownloadFileComplete(DownloadComic, OutFile, Success)
{
if(Success)
{
MsgPlus.DisplayToast("Todays Comic", "Succes:\n" + OutFile);
ComicWnd = MsgPlus.CreateWnd("comic.xml", "TodaysComic");
ComicWnd.ImgElmt_SetImageFile("DisplayComic", OutFile);
}
else
{
MsgPlus.DisplayToast("Todays Comic", "Failed.");
}
}
And this is my XML file:
code:
<Interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Window Id="TodaysComic" Version="1">
<Attributes>
<Caption>Todays Comic</Caption>
</Attributes>
<Position Width="212" Height="112"/>
<Elements>
<Element xsi:type="ImageElement" Id="DisplayComic">
<Position Top="0" Left="0"/>
<Image>
<Name></Name>
</Image>
</Element>
</Elements>
<WindowTmpl>
<Corners Shape="Round">
<RoundSize>3</RoundSize>
</Corners>
<Borders Type="Dialog"/>
</WindowTmpl>
<Controls>
</Controls>
</Window>
</Interfaces>