Shoutbox

[How To] - Find CmdId's - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Skinning (/forumdisplay.php?fid=41)
+----- Thread: [How To] - Find CmdId's (/showthread.php?tid=80044)

[How To] - Find CmdId's by vikke on 12-14-2007 at 03:22 PM

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..


RE: [How To] - Find CmdId's by CookieRevised on 12-14-2007 at 09:19 PM

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.
RE: [How To] - Find CmdId's by warmth on 12-26-2007 at 08:27 PM

why this thread didn't get sticked??? :(


RE: [How To] - Find CmdId's by TRash19 on 01-04-2008 at 06:14 PM

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? :$


RE: [How To] - Find CmdId's by deAd on 01-04-2008 at 06:27 PM

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


RE: RE: [How To] - Find CmdId's by TRash19 on 01-04-2008 at 06:41 PM

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 :)
Trigger CmdId's by Alain_87 on 12-15-2008 at 03:43 PM

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) ;)




RE: [How To] - Find CmdId's by stuartbennett on 12-15-2008 at 05:40 PM

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.


RE: [How To] - Find CmdId's by Alain_87 on 12-15-2008 at 06:21 PM

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 :)