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

Upload to FTP
Author: Message:
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. Upload to FTP
Hi.
I'm from Denmark and my english isn't good, but I'll try.
How can I upload a XML document to a FTP (server)?

Thanks in advance
Simon
11-03-2006 01:32 PM
Profile E-Mail PM Web Find Quote Report
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Upload to FTP
use SmartFTP (or any other ftp client) and login to your ftp account. then you should have no problems to upload your files. just drag and drop them into the program and they will be uploaded :)

This post was edited on 11-03-2006 at 01:38 PM by ins4ne.
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
11-03-2006 01:34 PM
Profile PM Find Quote Report
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. RE: Upload to FTP
Hi.
Hehe.. I wnt to make a MSG Plus! Live script which upload a XML-document to a FTP.
11-03-2006 01:37 PM
Profile E-Mail PM Web Find Quote Report
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Upload to FTP
ah k sorry :( didnt pay attention to the subforum you posted in :$
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
11-03-2006 01:39 PM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Upload to FTP
[Help] FTP upload
11-03-2006 01:41 PM
Profile E-Mail PM Web Find Quote Report
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. RE: Upload to FTP
Hi.
I can't find out what i need in the code and what there isn't necessary.
I'm still a bit new to MSG Plus! Live-scripting.
11-03-2006 01:45 PM
Profile E-Mail PM Web Find Quote Report
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
34 / Male / Flag
Joined: Apr 2006
RE: Upload to FTP
There are two other scripts that I know of which use FTP upload: Status2FTP and my AnswerPhoneFTP. The good thing about the scripts engine is that you can read other people's code and learn from it.
11-03-2006 06:47 PM
Profile E-Mail PM Web Find Quote Report
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. RE: Upload to FTP
Hi.
I have tried to read their scripts, but i can't find out how they upload their files.
11-03-2006 08:55 PM
Profile E-Mail PM Web Find Quote Report
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
34 / Male / Flag
Joined: Apr 2006
RE: Upload to FTP
OK. Please forgive me if this is wrong in any way! This is ripped from my script.

Variables at the top:

code:
var XMLPath = MsgPlus.ScriptFilesPath+ "\\file.xml";
var ConfigServer = "";
var ConfigPort = 21;
var ConfigUsername = "";
var ConfigPassword = "";
var ConfigDirectory = "";
var ConnectionHandle;


To open a connection:

code:
ConnectionHandle = Interop.Call('wininet', 'InternetOpenW', 'ScriptName', 0, 0, 0, 1);


And to upload:

code:
try
{
var result = Interop.Call('wininet', 'InternetConnectW', ConnectionHandle, ConfigServer, ConfigPort, ConfigUsername, ConfigPassword, 1, 1, 0);
var test = Interop.Call('wininet', 'FtpSetCurrentDirectoryW', result, ConfigDirectory);
var test = Interop.Call('wininet', 'FtpPutFileW', result, XMLPath, "file.xml", 2, 0);
Interop.Call('wininet', 'InternetCloseHandle', result);
MsgPlus.DisplayToast("","Uploaded"); // Only for debugging!
}
catch(err)
{
MsgPlus.DisplayToast("", "Error");
}


Hope this helps

Robert
11-03-2006 09:00 PM
Profile E-Mail PM Web Find Quote Report
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. RE: Upload to FTP
Hi.
It works!!! Many thanks! (L)
11-04-2006 09:11 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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