What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Skinning » [How To] - Find CmdId's

[How To] - Find CmdId's
Author: Message:
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
O.P. [How To] - Find CmdId's
Using Winspector
First, download Winspector from it's website. It's a free tool to view Windows-messages sent to any window. Windows is built on these different types of messages, and the message for button-actions is called WM_COMMAND.

Each Windows-message has a wParam and lParam (if you don't know what it is, don't worry). Each button in Messenger has it's own unique CmdId.
When a button is clicked inside Messenger, the WM_COMMAND message is getting sent, and it's wParam contains the CmdId for the button. And when Messenger retrieves the message, it reads the wParam, to identify which button is getting clicked.
Documentation on WM_COMMAND here.

So to sum up, when you click a button, a Windows-message will be sent to the Messenger-window. This message tells Messenger a button has been clicked, and it also tells which CmdId the button has. We need to find out that CmdId, in order to create a button to do the task the original button would do. When the user clicks our button, the identical message will be sent and Messenger does the task.

So, fire up Winspector. To the left you will see a list of every window running on your machine, even the hidden ones. Find the Messenger contact list window (look for MSBLWindowClass "Windows Live Messenger" or similar), right-click on the list-item, and choose "Messages...".
Hopefully, a new window will be created inside the Winspector window, that's where all messages are displayed. However we want to filter out all messages but WM_COMMAND, searching through 1000's of 1000's of messages is not recommended.

To apply a filter, right-click on the Messages-window inside the Winspector window, and click "Edit Message Filter". Click the "Filter All" button in the new "Edit Message Filter"-window, and double-click on WM_COMMAND in the left list. If you've done this correctly you will have all messages in the left list, but WM_COMMAND in the right. Click OK, and press a button in the Messenger-window.

The Message-list inside Winspector just got updated! You should see a WM_COMMAND item in the list now. Click the "+"-button to show detailed information about that message. You will now see something like this:
Control ID: 40317.
There you go, that's the CmdId.

Plus! runs inside the Messenger-process and has the ability to retrieve these WM_COMMAND messages as well, you should be able to get Plus! command IDs as well..

This post was edited on 12-14-2007 at 03:24 PM by vikke.
12-14-2007 03:22 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [How To] - Find CmdId's
OR, if you want to duplicate the action which is also available in some menu in Messenger, simply use a resource editor, like Resource Hacker, and check the menu resources. The cmd_id will be listed in plain sight there:
  1. Launch your favorite resource editor
  2. Open the language file of Messenger (eg: msgslang.8.5.1302.1018.dll)
  3. Select the 'Menu' resource table
  4. Search for the text of the menu item which action you want to duplicate
    Note: don't forget to include the ampersand (&) in your search text
  5. Locate the cmd_id
eg:
[Image: attachment.php?pid=873714]

=> thus, the cmd_id for setting your status to busy is 40168.


This method is much quicker and requires less knowledge. But it will only work if the action you want to duplicate is available somewhere in some menu.

.png File Attachment: cmdid_from_menu.png (24.95 KB)
This file has been downloaded 1624 time(s).

This post was edited on 12-14-2007 at 09:50 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-14-2007 09:19 PM
Profile PM Find Quote Report
warmth
Veteran Member
*****

Avatar
Electronic Engineer

Posts: 1730
Reputation: 26
39 / Male / Flag
Joined: Jul 2003
RE: [How To] - Find CmdId's
why this thread didn't get sticked??? :(
@warmth - Beta Testing a life!
Official Nokia (former Ovi) Suite Beta Tester | Nokia Beta Labs Contributor of the month (June, 2011)
12-26-2007 08:27 PM
Profile PM Web Find Quote Report
TRash19
Junior Member
**

Avatar
TechNet - IT training with Microsoft

Posts: 80
Reputation: 1
33 / Male / Flag
Joined: Dec 2007
RE: [How To] - Find CmdId's
If is not problem, i creat a list from ID's for a WLM9 and i share in a forum with everybody (because somebody use 9, and they can't find the ID's)! Is not problem? :$
                                              [Image: z0rfncwf-trashbmpd.png]
01-04-2008 06:14 PM
Profile E-Mail PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [How To] - Find CmdId's
The command IDs can be found the same way for Messenger 9, and it's probably not a good idea to post them anyways. They might change in later releases too :P
01-04-2008 06:27 PM
Profile PM Find Quote Report
TRash19
Junior Member
**

Avatar
TechNet - IT training with Microsoft

Posts: 80
Reputation: 1
33 / Male / Flag
Joined: Dec 2007
RE: RE: [How To] - Find CmdId's
quote:
Originally posted by deAd
The command IDs can be found the same way for Messenger 9, and it's probably not a good idea to post them anyways. They might change in later releases too :P

Yes, I know, but the release version date is not tomorrow:P And who wanna create a skin to 9, maybe cant find some Id...But, OK, I understand :)
                                              [Image: z0rfncwf-trashbmpd.png]
01-04-2008 06:41 PM
Profile E-Mail PM Web Find Quote Report
Alain_87
New Member
*


Posts: 2
Joined: Dec 2008
Trigger CmdId's
Hi,
i found a cmdId and i would like to trigger it.
(example : cmdid=40233 id=atom(msntodaybtn) )
for the moment, i only know how to associate it with a button.

how can i start cmdid::40233 automatically at messenger startup modifying the .dll (v8.1) ?
or from an external call (vb script or java, ..) ?

thanks a lot if you can help.
(french man Alain) ;)



12-15-2008 03:43 PM
Profile E-Mail PM Find Quote Report
stuartbennett
Senior Member
****

Avatar

Posts: 952
Reputation: 1
43 / Male / Flag
Joined: Nov 2003
RE: [How To] - Find CmdId's
go to the tools menu in messenger click on options then go to the section called either "general" or "Signin" depending on which version of messenger your using and the the box next to "show msn today after i sign into messenger" and viola.
12-15-2008 05:40 PM
Profile E-Mail PM Web Find Quote Report
Alain_87
New Member
*


Posts: 2
Joined: Dec 2008
RE: [How To] - Find CmdId's
thanks, but in fact it is not a function activable from menu that i want to trigger.  :)
and meanwhile i found a module :  VB Script

' get windows "handle"
Set oWrap = CreateObject("DynamicWrapper")
oWrap.Register "USER32.DLL","FindWindowA","i=ss","f=s","r=l"
HWndWLM = oWrap.FindWindowA(vbNullString,  "Windows Live Messenger")

Const WM_COMMAND = &H111
const wParam = 40233    ' CmdId  example
const lParam = 0 '&H00000000 

oWrap.Register "USER32.DLL","PostMessageA","i=huuu","f=s","r=l"
oWrap.PostMessageA HWndWLM,WM_COMMAND,wParam,lParam

---

thanks a lot :)
12-15-2008 06:21 PM
Profile E-Mail 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