What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Two questions: !remotecommand and Messenger.MyContacts

Two questions: !remotecommand and Messenger.MyContacts
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Two questions: !remotecommand and Messenger.MyContacts
PS: reading the scripting documents helps a lot in such cases. Most problems you encountered here are explained very clearly in the scripting documentation.

So, major tip: each time you want to use a certain function, look up that function in the scripting documentation and read its explaination.




eg: Scripting Doc > Index > OnEvent_ChatWndSendMessage
quote:
Return Value
A string containing the message to be sent (thus not recieved) instead (thus it will be replaced) of Message. If you do not want to modify the message, simply return Message without changing it. No size restriction applies to the new message except for the maximum size allowed by Messenger. If the event handler returns an empty string, the message is ignored and not sent to the server.
Which covers your first problems you had.



eg: Scripting Doc > Index > OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
quote:
Origin
Name of the user that sent the message (which covers one of your other questions in how to get the contact's name), as it appears in the chat window.......

Return Value
A string containing the message to be displayed in the chat window instead of Message (which explains why you didn't saw what the contact had typed, but you saw your new string, at least a part of it). If you do not want to modify the message, simply return Message without changing it. The new string will be parsed for possible format codes. It is important to remember that the new message cannot be longer than the original one (use Message.length) and will be cut if necessary which explains why the string was truncated. Also, Messenger will not re-parse the message for emoticons codes.
Which covers all the other problems you had with ChatWndReceiveMessage.
Note: there are other VERY important notes about this event function. I'm not going to quote them all though, see the help files for that.



eg: Scripting Doc > Index > ChatWnd.SendMessage
quote:
The ChatWnd.SendMessage function sends a (new) message to the contacts currently present in the chat window.
Important:
quote:
The EditChangeAllowed property should be checked before this function is called.



eg: Scripting Doc > Index > ChatWnd.EditChangeAllowed
quote:
The ChatWnd.EditChangeAllowed property specifies whether or not text can be entered/send in the typing area of the chat window.



eg: Scripting Doc > Index > Messenger.MyName
quote:
A string containing the name of the current user (thus not a contact; the user is you... hence MyName).




etc...

The scripting documentation can be found on the official homepage of Messenger Plus!, here:
http://www.msgpluslive.net/scripts/view/13-Offici...ing-Documentation/

Or by selecting "Script Documentation" in the Options menu in the Script Editor.

have fun scripting...
but remember, read the docs first, then experiment with trial and error...

;)

This post was edited on 12-13-2007 at 11:47 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-13-2007 11:41 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Two questions: !remotecommand and Messenger.MyContacts - by kaourika on 12-11-2007 at 08:05 PM
RE: Two questions: !remotecommand and Messenger.MyContacts - by markee on 12-12-2007 at 09:01 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by kaourika on 12-13-2007 at 12:31 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by ddunk on 12-13-2007 at 12:40 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by kaourika on 12-13-2007 at 01:19 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by pollolibredegrasa on 12-13-2007 at 01:29 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by kaourika on 12-13-2007 at 01:44 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by ShawnZ on 12-13-2007 at 01:46 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by kaourika on 12-13-2007 at 01:55 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by ShawnZ on 12-13-2007 at 02:31 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by kaourika on 12-13-2007 at 03:53 AM
RE: Two questions: !remotecommand and Messenger.MyContacts - by markee on 12-13-2007 at 11:12 PM
RE: Two questions: !remotecommand and Messenger.MyContacts - by CookieRevised on 12-13-2007 at 11:41 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