Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi,

I'm using FSUIPC 5.131a on Prepar3d v4.2. Lately, I've noticed that whenever I execute ipc.display() from a lua file, the window title on the taskbar flashes (very fast and repetitively, like it would if I created an ahk file with a loop of 'activate window' commands), trying to draw the window focus back to P3D. This doesn't seem to happen if I send the message through 0x3380.

Here is a simple lua I'm triggering at the moment (via 0x0D70 normally, but I've also tested it through the key assignments tab of FSUIPC):

ipc.display("OEMA 211700Z 31013KT 9999 SCT045 SCT100 42/M06 Q1010 NOSIG\n\nSTAND: GATE 132\n| DEP:0 ARR:0 | ")
ipc.sleep(30000)

This is a minor nuisance, as it will draw the focus back to P3D when I might be trying to type in the vPilot window, or checking a chart.

Is it a bug, or just me?

Cheers,
Bryn.

Posted
13 hours ago, Bryn said:

I'm using FSUIPC 5.131a on Prepar3d v4.2. Lately, I've noticed that whenever I execute ipc.display() from a lua file, the window title on the taskbar flashes (very fast and repetitively, like it would if I created an ahk file with a loop of 'activate window' commands), trying to draw the window focus back to P3D. This doesn't seem to happen if I send the message through 0x3380.

That doesn't happen here. Not sure why it's different for you.  FSUIPC uses similar SimConnect requests for all display needs in P3D. What P3D then does is up to it.

There are several Lua plug-ins using the display facility -- display valslog Lvars, VAS monitor, all three of which loop re-displaying every time there's a change, and this certainly happens without any focus being changed. 

Pete

 

 

Posted

Thanks - I feared you would say that. I'll search on. It turns out not to be ipc.display that causes the problem, but it seems any lua file triggered causes the behaviour.

  • 4 months later...
Posted

Hi,

I'm still getting this problem with lua and ipc.display(). I was hoping FSUIPC would just 'grow out of it' on my computer, but it persists. I can't see anything in the log that would explain why this is happening.

Here I've posted a video of what happens when I load the log lvars.lua using Ctrl_F10. When the lua script ends and the simconnect window closes, the same behaviour repeats. I am in fullscreen, so I've pressed the left windows key to bring up the taskbar to show what is happening there after I load the script. If another window is in focus when the script is loaded, the prepar3d window steals the focus.

video of the effect (YouTube)

Posted
14 minutes ago, Bryn said:

Here I've posted a video of what happens when I load the log lvars.lua using Ctrl_F10. When the lua script ends and the simconnect window closes, the same behaviour repeats. I am in fullscreen, so I've pressed the left windows key to bring up the taskbar to show what is happening there after I load the script. If another window is in focus when the script is loaded, the prepar3d window steals the focus.

Sorry, I'm lost. This is from over 4 months ago?  Am I supposed to read the thread from the start?

What is CTRL_F10? Where is it assigned? Where are you using it/ (I'm not going to start viewing YouTube videos without knowing why!).

Isn't this a symptom which can only be a P3D4 action? Is the problem that P3D steals focus? Did you try updating to P3D4.3?

Pete

 

Posted

The first post in the thread explains the original problem I was having. This is not a long thread, and the other two posts are basically shoulder shrugs. A difference from the first post that I should have mentioned is that I have updated to version 4.3. I should also have added that I am now using FSUIPC 5.141e.

Ctrl F10 is the key sequence I created in FSUIPC to trigger the lua action (though any key sequence would do). The lua file is the standard log lvars.lua, but could be any lua file. When the simconnect window opens, the behaviour begins for about 3 seconds, and then when the simconnect window closes, it begins again for about 3 seconds. When FSUIPC runs these lua files, I get the behaviour I have described, and which I show in the YouTube link. 

The problem is that P3D steals focus erratically whenever I trigger a lua script that calls ipc.display(). It doesn't steal focus once, it steals focus repeatedly for about 2 to 3 seconds. If I try to focus on any other window during those 2 to 3 seconds, P3D steals the focus again. It's as if a focus call is being repeated for those three seconds.

Bryn.

 

Posted
14 hours ago, Bryn said:

Ctrl F10 is the key sequence I created in FSUIPC to trigger the lua action (though any key sequence would do). The lua file is the standard log lvars.lua, but could be any lua file. When the simconnect window opens, the behaviour begins for about 3 seconds, and then when the simconnect window closes, it begins again for about 3 seconds. When FSUIPC runs these lua files, I get the behaviour I have described, and which I show in the YouTube link. 

The problem is that P3D steals focus erratically whenever I trigger a lua script that calls ipc.display(). It doesn't steal focus once, it steals focus repeatedly for about 2 to 3 seconds. If I try to focus on any other window during those 2 to 3 seconds, P3D steals the focus again. It's as if a focus call is being repeated for those three seconds.

Okay. The problem is that all FSUIPC does is call the SimConnect Text function to display the text. It has no control over the focus, nor can it flash the title bar. I really have no way of proceeding to help in this. Just logging the fact that I'm calling a SimConnect function won't help, and nothing else is actually involved.

There are other programs which use the Simconnect Text function, of course, but I don't know of any others using the Simconnect Message Window. they either use the more basic SimConnect text (the one which defaults to the bar across the top of the Window), or the Menu.

I could provide you with an option to only use the basic Text display, to see if that helps. I can't really think of anything else I can do.

Pete

 

Posted

Try FSUIPC5141f_TEST.zip, but first add

NoMessageWindows=Yes

to the [General] section of the INI.

All this does is force the use of the simpler SimConnect text display instead of the Message Window.  I don't know if that will make any difference, though. Let me know. If it makes no difference I'll take the option out.

Pete

 

Posted

Thanks Pete.

After a couple of minutes of testing, it appears the simpler text display doesn't cause the behaviour. It's not as pretty, but it does the job, so I'm very happy.

I'll put it through a full flight test tomorrow, and confirm the result tomorrow night.

Thanks very much.

Bryn.

Posted
11 minutes ago, Bryn said:

After a couple of minutes of testing, it appears the simpler text display doesn't cause the behaviour. It's not as pretty, but it does the job, so I'm very happy.

Well, it is definitely down to P3D then. The only change that makes is using the Simconnect text display call instead of the Simconnect message disaplay call. The same line in fact -- it's the same function call, just with the parameter to the call changed according to that INI file setting (the Menu request is also the same function but FSUIPC doesn't provide such an option).

I'll report it to L-M. But as I can't reproduce it on either of two different systems, and yours is the only report, I suspect they won't be able to nail it.

Pete

 

Posted

Thanks again Pete. I've tested it throughout the day today, and there haven't been any instances of focus stealing. Cheers - I really appreciate your time. Bryn.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.