Posted by member 380556 on 2007-11-20 14:12:06 link

I have reached my objective !! ^^

I use the module 'SendMessage' (http://www.shellfront.org/modules/sendmessage-1.0.zip). It is a "Litestep module or win32 executable that wraps the SendMessage windows api call".
Thanks to this, i simply send the hotkey combination to 'AIMP2': "it sends the given message to a window described by the given Window class and title". (At least one is needed actually)

In my case (AIMP2, CTRL+ALT+P for Play/Pause):
ampPlay_OnLeftClick !SendMessage "" "AIMP2" 786 104 5242883

where 786 is the decimal value of WM_HOTKEY, 104 the one of wParam($68) and 5242883 the one of IParam($00500003).
I found wParam and IParam with Spy++.

I still need to understand where those values come from but it works ^^

PS: i believe the WM_COMMAND message doesn't work again because the parameter is not a menu index of AIMP2 main object.

Edit:
(+) i just learn that :
-the wParam is the Play/Pause command
-the IParam is the value of the hotkey combination and is not required
:]
(+) even if the IParam is not required, a key combination must be associated with the action we want to use. Otherwise, it does nothing ^^'