Quote:
Originally Posted by amagalma
How did you come up with 0x09DCB as the Menu identifier (IDM_*)?
|
I'm not sure why your Spy++ is reporting all these other commands. Perhaps check that it only logs the "FX: Track something" window, not all system windows?
If you set Spy++ to show "Raw Message Parameters", it will also report the wParam and lParam that the script must use when posting the message.
Alternatively, anyone that doesn't have Visual Studio and Spy++ can use this script to check the WM_COMMAND in REAPER's IDE:
Code:
-- Change this to however you prefer to select the window
w = reaper.JS_Window_FromPoint(reaper.GetMousePosition()) --Find("FX: Track 1", true)
t = {}
function loop()
pOK, pass, time, wLow, wHigh, lLow, lHigh = reaper.JS_WindowMessage_Peek(w, "WM_COMMAND")
if time ~= prevTime then
prevTime = time
t[#t+1] = {time = time, wLow = wLow, wHigh = wHigh, lLow = lLow, lHigh = lHigh}
end
reaper.defer(loop)
end
reaper.atexit(reaper.JS_WindowMessage_ReleaseWindow(w))
if w then
title = reaper.JS_Window_GetTitle(w, "")
reaper.JS_WindowMessage_ReleaseWindow(w)
iOK = reaper.JS_WindowMessage_Intercept(w, "WM_COMMAND", true)
loop()
end
(I checked in Linux, Windows x64 and x32, and they all seem to use the same number for the menu command, so I think it is safe to use.)