What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » artificial intelligence script(close window)

artificial intelligence script(close window)
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: artificial intelligence script(close window)
  • #0 I opened the thread looking in full expectation to see something about AI... this has got absolutely nothing todo with AI... :(

  • #1
    1. The ChatWndDestroyed event is fired when a chat window on your side is closed.

    2. You can still send a message from inside this event because this event is triggered right before a chat window of you gets closed/destroyed, not after. So the window is still open at the time this event is executed.

    3. Remember that a chat window can have multiple contacts. So it isn't as easy as "to get the contact's email". You will get the emails of all the contacts which are in the chat window.

    4. To get the emails of the contacts, you need to enumerate a Contacts object to get a Contact object from where you can get the Email property.
      If you look into the Scripting Documentation, you'll see that a ChatWnd object (which you get as a parameter in the ChatWndDestroyed event) will have a property Contacts.
      Thus:

      ChatWnd.Contacts
        > Contact > Contact.Email
        > Contact > Contact.Email
        > Contact > Contact.Email
        > etc...

      in code:
      code:
      var objContactsInWindow = ChatWnd.Contacts;
      for (var e = new Enumerator(objContactsInWindow); !e.atEnd(); e.moveNext()) {
              var objContact = e.item();
              Debug.Trace(objContact.Email);
      }
      or in short:
      code:
      for (var e = new Enumerator(ChatWnd.Contacts); !e.atEnd(); e.moveNext()) {
              Debug.Trace(e.item().Email);
      }
      note: this is also given as example in the Scripting Documentation.

    5. Because of (A), what you want to do is not possible with the use of the ChatWndDestroyed event.
      To do what you want you need to use 'packet sniffing' and sniff the incomming packets for a closed session notification.

      Because of the nature of these closed session notifications, you can still not do what you want to do as these notifications are also send by the Messenger server itself when a timeout occurs (thus even when the contact did not closed the window).

    6. Before you send a message to a chat window you must always check if you actually can send a message by checking upon the EditChangeAllowed boolean property of the ChatWnd object.
  • #2
    1. I dunno what you exactly mean or want here, but I guess you want to know what is used in JScript as an escape character? it is the slash: \

      eg:
         \n => newline
         \t => tab
         \xCD => character in hexadecimal notation (must be 2 digits)
         \uABCD => unicode character in hexadecimal notation (must be 4 digits)
         \\ => the character \
         \/ => the character / (for use in regular expressions for example)
         etc...

    2. As said by Cloudhunter, a nudge can not be detected by normal means. Again you must revert to 'packet sniffing' for that.


packet sniffing is listening to the raw incomming packets which are send by the servers (and listening to the raw outgoing packets send by your Messenger). You can use Pai's Xniff ActiveX DLL to do this.

This post was edited on 09-20-2006 at 12:29 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-20-2006 12:19 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
artificial intelligence script(close window) - by xsouldeath on 09-19-2006 at 11:32 PM
RE: artificial intelligence script(close window) - by cloudhunter on 09-19-2006 at 11:48 PM
RE: artificial intelligence script(close window) - by CookieRevised on 09-20-2006 at 12:19 AM
RE: artificial intelligence script(close window) - by xsouldeath on 09-20-2006 at 12:27 AM
RE: artificial intelligence script(close window) - by Spunky on 09-20-2006 at 12:30 AM
RE: artificial intelligence script(close window) - by CookieRevised on 09-20-2006 at 12:34 AM
RE: artificial intelligence script(close window) - by Lou on 09-20-2006 at 12:36 AM
RE: artificial intelligence script(close window) - by xsouldeath on 09-20-2006 at 01:39 AM
RE: artificial intelligence script(close window) - by CookieRevised on 09-20-2006 at 01:51 AM
RE: artificial intelligence script(close window) - by xsouldeath on 09-20-2006 at 02:07 AM
RE: artificial intelligence script(close window) - by CookieRevised on 09-20-2006 at 02:13 AM
RE: artificial intelligence script(close window) - by xsouldeath on 09-20-2006 at 03:13 AM
RE: artificial intelligence script(close window) - by xsouldeath on 09-20-2006 at 11:59 PM
RE: artificial intelligence script(close window) - by CookieRevised on 09-21-2006 at 09:38 AM
RE: artificial intelligence script(close window) - by xsouldeath on 09-21-2006 at 12:59 PM
RE: artificial intelligence script(close window) - by Matti on 09-21-2006 at 03:19 PM
RE: artificial intelligence script(close window) - by xsouldeath on 09-21-2006 at 07:31 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