What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Invoke first personalised status

[?] Invoke first personalised status
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. [?] Invoke first personalised status
Based on CookieRevised's reply to Call MsgPlus functions from a script I'm trying to call personalised statuses... The function seems to work, but with no effect. The post would be for 4.50 right?
<Eljay> "Problems encountered: shit blew up" :zippy:
02-18-2008 10:29 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: [?] Invoke first personalised status
It works fine here :)
code:
var h = Messenger.ContactListWndHandle;
if (!h) h = Interop.Call('user32', 'FindWindowW','MSNHiddenWindowClass','');
Interop.Call('user32', 'PostMessageW', h, 0x0111 /* WM_COMMAND */, 7700 /* wParam (cmdid) */, 0x0000 /* lParam */ );
02-20-2008 01:08 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [?] Invoke first personalised status
It was working part of the time ^o) I think it works now as long as the CL is not minimized/closed
<Eljay> "Problems encountered: shit blew up" :zippy:
02-20-2008 04:42 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [?] Invoke first personalised status
quote:
Originally posted by SpunkyLoveMuff
It was working part of the time ^o) I think it works now as long as the CL is not minimized/closed
With using my example code: when the contactlist is closed there is no contactlist window to get the handle from and thus not a window to send the message to. So obviously that wont work; the contactlist needs to exist (it can be minimized though)....

because of:
  Interop.Call('User32', 'PostMessageW', Messenger.ContactListWndHandle, WM_COMMAND, wParam, lParam);


-

If you don't want to depend on Plus! to get the handle of the contactlist window (thus by using the Messenger.ContactListWndHandle property) you can also send the WM_COMMAND to the hidden Messenger window. But again, you of course need to get the handle to that window in order to send the message.

But beware if you use felipEx's example code. That wont work properly when you have more than one Windows Live Messenger running (polygamy).

See here and/or here for a short solution to get the handle to the MSNHiddenWindowClass window of the Windows Live Messenger client the code is running in.

If you don't do that, you might/will end up changing stuff in the other Messenger client (and thus in the other Messenger accounts)...

;)

This post was edited on 02-20-2008 at 11:29 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-20-2008 10:57 PM
Profile PM Find Quote Report
« 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