What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Why Plus 5 don't suport Messenger.MyPersonalMessage?

Pages: (2): « First « 1 [ 2 ] Last »
Why Plus 5 don't suport Messenger.MyPersonalMessage?
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
quote:
Originally posted by Menthix
Couldn't you just bring it back and set a rate limit on it? So scripts don't break, but just do less actual PSM changes? I agree the way some old scripts change the PSM could be annoying, but people will stop using those automatically. There are plenty of good uses for PSM-changing scripts WLM-2011 style, push tweets to it for example.

If it does change focus to the contact list though, there's going to be a lot of annoyed people that will suddenly find the huge message they were typing never got put into the chat window =/
<Eljay> "Problems encountered: shit blew up" :zippy:
02-13-2011 10:13 AM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
There you got a point.. But letting it fail silently won't break the scripts completely and keeps focus to the window it belongs to.
02-13-2011 10:27 AM
Profile PM Find Quote Report
Menthix
forum admin
*******

Avatar

Posts: 5537
Reputation: 102
40 / Male / Flag
Joined: Mar 2002
RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
I see, for some reason I thought totonf meant PSMs have a different focus in WLM2011, as in PSMs are now used in another way / show up in the Windows Live social stream :p... Although that is still true too.

But yes, changing focus to another window is not good, would need to find another way without changing any focus.

This post was edited on 02-13-2011 at 10:31 AM by Menthix.
Finish the problem
Menthix.net | Contact Me
02-13-2011 10:30 AM
Profile E-Mail PM Web Find Quote Report
Doublevil
New Member
*


Posts: 1
Joined: Mar 2011
The solution!
I know this thread is dead since one month but I just wanted to help people who encounter the same problem.

Since I didn't found a trick in any website I tried, I just searched myself and found out how to change your personal message from a script (sample in the end) :


- If you just need to change the personal message in the ChatWndSendMessage event :
   Return the text "/psm [your message here]" and it will be updated.


- If you need to change the personal message in any other function or event :
   Send a special message to a chat window using the ChatWnd.SendMessage(string) function.
   This special message should be unique and the probability that the user types it should be negligible.
   This will trigger a ChatWndSendMessage event.

   After some tests, I found that if you just return "/psm [your message here]" from a script-sent message, it will only send "[your message here]" to your contact and never update the personal message.

   What you have to do is to catch your special message using a condition, and return "/psm /psm [your message here]" (no, that's not a typo). This is just dumb but it works.


Here is the sample code (copy in a new script to test) :
code:
var strSpecialMessage = "§¤§¤@~ or anything"; // Special message to use to send a message in any function.

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    if (Message == strSpecialMessage)
    {
        return "/psm /psm [your message here]";
    }
   
    else if (Message == "NOW")
    {
        ChatWnd.SendMessage(strSpecialMessage);
        return "";
    }
   
    else return Message;
}

This code will change your personal message to "[your message here]" when you send the exact message "NOW" in any chat window. But you can trigger it from any function if you change the code.

All you need is a chat window... if your script isn't related to a chat window, then you'll have to make sure there are opened chat windows, and if not, try to open one, send the message and then close it immediately.
I don't know how to close it, though. Maybe with an external library function which takes in parameter the handle of the window. Well... that's complicated.
03-24-2011 10:48 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
quote:
Originally posted by Doublevil
and return "/psm /psm [your message here]"
:O Doesn't that mean there is also a command parsing bug in Plus!?....

This said, your use of the OnEvent_ChatWndSendMessage to work around the PSM limitaton is interesting, but can't you just use oChatWnd.SendMessage("/psm blahblah") or oChatWnd.SendMessage("/psm /psm blahblah") in that case?
(Can't test because I don't run WLM 2011 atm)

quote:
Originally posted by Doublevil
I don't know how to close it, though.
What most people do:
Interop.Call("User32", "SendMessageW", oChatWnd.Handle, 0x10 /*WM_CLOSE*/, 0,0);

Or in a more gracefull/safer way:
Interop.Call("User32", "PostMessageW", oChatWnd.Handle, 0x0111 /*WM_COMMAND*/, 0x9C51, 0);

Or with the use of Plus! scripting functions:
oChatWnd.SendMessage("/close")

---

However, note that using the SendMessage function might not always work. You always need to check if the typing box is actually enabled and if it can recieve commands (using oChatWnd.EditChangeAllowed)

PS: instead of using a chatwindow, you might also wanna try sending the string to the word wheel edit box (the search box) in the contact list. However, that can't be done directly with pure scripting though. You probably need some Windows API for that or worse Active Accessebility.

This post was edited on 03-25-2011 at 01:59 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-24-2011 11:52 PM
Profile PM Find Quote Report
JaderCM
New Member
*

Avatar


Posts: 2
43 / Male / Flag
Joined: Feb 2011
O.P. RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
Plausible solution, but it is unacceptable to lose focus of the window.

Discussion still open. :(
03-25-2011 12:51 AM
Profile E-Mail PM Web Find Quote Report
F4ever
New Member
*


Posts: 1
Joined: Apr 2011
RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
Scripts like Countdowns... are not working correctly when counting down in the psm. :(
04-01-2011 07:16 PM
Profile E-Mail PM Find Quote Report
Arcticwolfx
Full Member
***

Identity Unknown

Posts: 238
Reputation: 10
113 / Female / Flag
Joined: Feb 2011
RE: Why Plus 5 don't suport Messenger.MyPersonalMessage?
quote:
Originally posted by F4ever
Scripts like Countdowns... are not working correctly when counting down in the psm. :(

Are you using Windows Live Messenger 2009 or 2011?
04-01-2011 08:35 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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