That is still the Case 😉
When P3D is open, go to (focus) another Window on the second Monitor, execute this simple script via Joystick Button Assignment - then the focus is switched back to P3D and the mouse-input is blocked. Sometimes for everything but P3D, sometimes for everything. It's more noticeable if I hit the Button a few times in a row (for testing purposes). When I repeatedly click or alt-tab (quantity depends on how often the button was hit) everything is back to normal.
This focus steal/blocking behavior is most noticeable when P3D is not focused. But I also noticed, this "something" happens even when P3D is focused. When I hit the Button a few times in a row while P3D is focused, any other window is blocked - the focus is instantly switched back to P3D.
My first Impression was also, that this happens when the lua is started (or compiled). But I think it has something to do when the lua ends (just done some more testing as I wrote)! When I run a little Loop via Button Assignment (logs a Message, sleeps for some Seconds), the focus steal/blocking happens when the loop has ended. Regardless of where the focus (inside/outside P3D) was when this Script was started. When I "tail -f" the Log, as soon as I see "finished", the Focus is stolen from Notepad++ and I have to click multiple Times on it to regain it.
Here's the Code:
local ticks = 0;
while (true) do
ipc.log("tick")
ipc.sleep(300)
ticks = ticks + 1
if ticks == 15 then
break
end
end
ipc.log("finished")
Nothing to be sorry for 🙂 What I actually tried to say with my last Post was that this Problem is not as critical as before - so look into it when it suits you best 😉
And that it doesn't matter where a Script is started, because it can also happen with ipc.macro or ipc.runlua.
What I'm trying to achieve in special, does not matter anymore. Thanks to Paul I found a great Workaround.
I stumbled over this while programming a StreamDeck Plugin which communicates (bi-directional) with P3D via FSUIPC (and Paul's C# Client DLL) - that is what I try to achieve in general. Since a Workaround is found for the Goal to repeatedly run lua-code, this odd behavior is not a Showstopper anymore for the Plugin development 😃
So to summarize: There is certainly some strange behavior, it would be cool if it could be fixed, but it does not stop anybody from anything 😅
Kind Regards
Daniel