Jump to content
The simFlight Network Forums

Active Window


Recommended Posts

Hi, Can anyone help with this issue?

I'm using multiple monitors with P3D. One main monitor has the P3D running on it and others have addons running in them i.e Fs Flight control, Vatsim, etc.

When im working in one of those monitors then they become the "Active" screen and if i then press a key command for then main P3D flight sim it doesn't work as that, at that time, is not the "Active" screen. I have to first move the mouse over to the P3D monitor and click on there. This is a faff on! So my Question is, is there anyway of assigning a button command using FSUIPC to revert back to P3D as the "Active" monitor or is there any other work around?

Many thanks for any suggestions

Regards

Link to comment
Share on other sites

Hi,

you could try using a simple lua script, such as:

h = ext.gethandle("name") --name is program name incl .exe, or program title (as listed in Task Manager)
ext.focus(h)

Save the above to your modules folder as, say, "usexxx.lua" where xxx suggests the program you are switching to, then, in FSUIPC, assign your button or key to Lua usexxx.

Cheers,

John

 

Link to comment
Share on other sites

Quote

So does it need ext. focus(h) at the end? What exactly do I type? 

Yes, of course it needs that. Its pretty simple - the first line gets the handle of the window that needs the focus, the 2nd line sets the focus to the window with that handle.

Quote

Then how do I put that in modules folder? 

You need to create a file with those lines using a text editor, such as notepad++ (better) or notepad.

John

Link to comment
Share on other sites

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.