Bug: "button" - commands do not always work

Jan 7, 2009 at 10:32 PM
As the posters before me, I highly appreciate this software as well!
It provides (nearly) all the information needed to build up a nice little control software for WMC.

Unfortnunately I face the problems somethimes that the "button"-command is not working properly.
Sometimes, the command is working perfectly and then all of the sudden it is not working anymore.
In times its not working, a "400 BadRequest" message is returned and the WMC- window in the task bar starts to blink
(when WMC is minimized).

It concerns all the "button"-command the software offers.

Do you have any idea what it could be? Since sometimes it is working and in other times no, it could be also related to a specific
software or setting which does not go together which these specific commands.

I would highly appreciate your help since i love this software and would like to use it as a basis!

Jan 8, 2009 at 12:44 PM
Edited Jan 8, 2009 at 12:51 PM
i guess i could isolate the problem:

the following if clause in "sendkeycmd.cs" causes the problem:
 if (NativeMethods.SetForegroundWindow(GetWindowHandle()) == false)
opResult.StatusCode = OpStatusCode.BadRequest;
return opResult;
It is true that at the time the "button"-commands were not working, WMC was not focused.
Later in "sendkeycmd.cs" there are helpers methods to focus the window in case it is not. Therefore i assume that those cause the problem described above.

Unfortunately i dont know much about API and the commands used, so i also dont know how those helper methods work.
Probably you could take a look into that.