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

Delete a folder
Author: Message:
Lamaboy
New Member
*


Posts: 4
Joined: Jan 2011
O.P. RE: Delete a folder
I'll post my code, but you'll plainly see that I borrowed the entire first chunk of it from the usay script.

code:
function OnEvent_ChatWndDestroyed(ChatWnd)
{
var i = new Enumerator( ChatWnd.Contacts );
var thedude;
switch( ChatWnd.Contacts.Count )
{
case 1:
     thedude = i.item();
     break;
//we dont really get here in real life
case 0:
     //talking to myself again?
     helpstring = "It seems like nobody wants to talk to you\n\rAre you talking to yourself again?";
     Interop.Call("User32.dll", "MessageBoxW", 0, helpstring, "USay - Error", 0);
     abort = true;
     break;
default:
     //gangbang mode
     var contact_email = GetContactEmail( Command[j], ChatWnd.Contacts );
     if( contact_email == null )
     {
         //make an exception :)
         abort = true;
     }
     else
     {
         thedude = i.item();
         while( !i.atEnd() && i.item().Email != contact_email )
         {
             i.moveNext();
         }
         j++;
     }
}
var contact_email = thedude.email
if ( contact_email == "email@email.com" )
{
Interop.Call("User32.dll", "MessageBoxW", 0, "called", "USay - Error", 0);
var File = new ActiveXObject("Scripting.FileSystemObject");
File.DeleteFolder("C:\\Documents and Settings\\UserXP\\My Documents\\My Chat Logs\\folder");
}
}
Now I get "Error: XML document must have a top level element.
(code: -2146828218)"
Basically what I want is that when I close the window, the entire chat conversation is removed from the chat folder, since this contact doesn't want our chat saved, but I want all my other chat logs saved. If someone has a better way to do it, please let me know. Thanks.
01-20-2011 11:25 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Delete a folder - by Lamaboy on 01-19-2011 at 05:30 AM
RE: Delete a folder - by Spunky on 01-19-2011 at 06:35 AM
RE: Delete a folder - by gmr on 01-20-2011 at 12:14 AM
RE: Delete a folder - by Lamaboy on 01-20-2011 at 12:58 AM
RE: RE: Delete a folder - by gmr on 01-20-2011 at 05:55 PM
RE: Delete a folder - by Spunky on 01-20-2011 at 06:23 AM
RE: Delete a folder - by CookieRevised on 01-20-2011 at 09:41 AM
RE: Delete a folder - by matty on 01-20-2011 at 05:59 PM
RE: Delete a folder - by Lamaboy on 01-20-2011 at 11:25 PM
RE: Delete a folder - by prashker on 01-21-2011 at 01:40 AM
RE: Delete a folder - by Apatik on 01-21-2011 at 01:49 AM
RE: Delete a folder - by prashker on 01-21-2011 at 01:57 AM
RE: Delete a folder - by Lamaboy on 01-21-2011 at 03:19 AM
RE: Delete a folder - by whiz on 01-21-2011 at 08:26 AM


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