What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Download file

Download file
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Download file
How I do this in the script I am currently working on is put a loading image in by default and then change the image using the script later.  Also when you use the MsgPlus.DownloadFile you have to put in another function for when it is complete.  Here is an example of what you should do:
code:
function OnEvent_DownloadFileComplete(URL,OutFile,Success){
    if(Success){//Check if the download worked properly
        if(URL == "http://domain.com/path/to/image.png"){//Check that it was the file you wanted
            Wnd.ImageElmt_SetImageFile("IdOfTheImageElement","\\"+OutFile);//Put the new image into the image element
    }else{
        if(URL == "http://domain.com/path/to/image.png"){
            MsgPlus.DownloadFile(URL,"X:\\path\\where\\you\\want\\the\\image\\to\\go.png");//Redownload the file
        }
    }
}

I hope this helps, if you need more information about something then just ask.  There are more complex ways of doing things but I think this is fairly nice code :P
[Image: markee.png]
10-31-2007 11:04 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Download file - by SnuZZer on 10-31-2007 at 06:54 PM
RE: Download file - by Dempsey on 10-31-2007 at 06:57 PM
RE: Download file - by SnuZZer on 10-31-2007 at 07:01 PM
RE: Download file - by markee on 10-31-2007 at 11:04 PM
RE: Download file - by SnuZZer on 11-01-2007 at 05:46 AM
RE: Download file - by Matti on 11-01-2007 at 08:38 AM
RE: Download file - by SnuZZer on 11-01-2007 at 01:36 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On