-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetForegroundWindow isn't working, but not errors are being generated #30
Comments
Small Update: |
In case it helps anyone else: On further investigation, this seems to be a general problem in that Windows doesn't like apps to push themselves forward automagically. Which is the use we NEED ;-) The solution was to FIRST set focus to MCEC, and then it can request a new window:
I hope that helps. |
Thanks for tracking this down. Yes, somewhere around Win7 the behavior changed to prevent apps from spamming users. Glad my decision to nest commands turned out useful ;-). |
It's great! Many thanks for the hard work. |
Describe the bug
I have created a group of commands using SetForegroundWindow. It is enabled, and the AppName(s) are correct.
I wish to be able to switch the PC between apps from a the control system. MCEC is connecting to the control system successfully.
When I issue a command, MCEC receives the command, matches it with the definition and runs the steps.
My commands are nested.
No errors are reported (I'm sure I have the correct AppName - and if it's wrong, I DO get an error saying the app cannot be found - example below)
I have tried running MCEC as admin in case this is a permissions issue.
I have increased logging to DEBUG but don't get any additional information.
I've tried disabling all AntiVirus in case this is catching the SetForegroundWindow API call - not sure how else to debug that though.
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
The desired app should gain focus and then maximise.
Version Information
Include the first line from the log window, like this:
Snippets from the log
Include any other relevant logs (either copy/pasted from the MCE Controller window or from the log files found in
%appdata%\Kindel Systems\MCE Controller
which contain more debug info).Desktop (please complete the following information):
Dell Laptop, Windows 11, Crestron control system
The text was updated successfully, but these errors were encountered: