Hi2all!
This is the first time i write in jscript so i don't know the syntax - but it's not that different from java so I hope I can make it
I read many tutorials about how2 create and write into a txt-file, but it doesn't work
here's the code i used:
myFile = new File('C://test.txt');
I wanted to save the text written in my conversations in this txt-file, and then upload it to a ftp-server (there should also be a window were the user of the script can write in the server's address, password and username), so it would be possible to upload the "logs" if you are chating somewhere, and then download them at home.
For the upload I used the script I found in the documentation - but still it's not working
function OnEvent_ChatWndCreated(ChatWnd)
{
myFile = new File('C://test.txt');
var Started = MsgPlus.UploadFileFTP("C:/Setup.log", "ftp://username.awardspace.com/", "username", "password", "test.txt");
if(Started)
Debug.Trace("Uploading file, waiting for event");
else
Debug.Trace("Couldn't start the upload");
}
function OnEvent_UploadFileComplete(Server, Destination, Source, Success)
{
Debug.Trace("UploadFileComplete event received for " + Destination);
Debug.Trace(" Success: " + Success);
}
Sorry 4 my bad english
- thx 4 your answers