Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi all. I am just wondering if anyone has an answer to my question How do I get all my Panels to appear in the correct place on my multi screen setup.

Currently I use Shift 3,4,5,6,7,8 to display all the panels on the main screen then drag them off to to the correct screens and this is a bit tedious. I have tried many ways to automate it but all without success. I have modified and  used Pete's "Tile Six" Lua script and I have played around with some mouse macro software but again with limited success.

Does anybody have any ideas or have any of you managed to do it successfully.

 

Thanks in advance

 

Owen Moore

  

Posted
10 hours ago, OwenM said:

Currently I use Shift 3,4,5,6,7,8 to display all the panels on the main screen then drag them off to to the correct screens and this is a bit tedious. I have tried many ways to automate it but all without success.

Do you save a flight after positioning them, and make it the default? That should save the positions. You then build any other flights from that one.

However, I have seen reports that it doesn't work properly on multiple screens. Perhaps if you use the nVidia Surround Mode facility to make them all look like one big screen it would work, but if they are of different sizes that may not be possible.

Pete

 

Posted

Yes I do have them as one big screen  using NVidia surround and  I do Save the flight with them all set up nicely on the 3 screens  but when you reload the saved flight  the panels are all displayed on top of the virtual cockpit -00 screen and you need to drag them out to the individual monitors and it look confusing when it starts up so I tend to save the flight without them all displayed then display them 1 at a time and put them where they belong.. I have read somewhere that FSX doesnt save panel positions so maybe I will have to keep doing it my way. 

 

Thanks anyway

 

Owen Moore

Posted

In my case (FSX boxed) if the open windows are undocked and placed on primary fs screen when the flight is saved it will work.
Prior to saving a flight I have a lua that will do this -

-- moves the window titled "GPS /RADIO" to my primary FS monitor, in this case it is monitor 2
ext.position("GPS /RADIO", 0, 0, 100, 62, 2)
ipc.exit()

 Then when I start a saved flight I press a key to run this lua to move it back where it belongs - 
 

-- moves the window titled "GPS /RADIO" to my secondary FS monitor, where it belongs in this case it is monitor 1
ext.position("GPS /RADIO", 0, 0, 100, 62, 1)
ipc.exit()

You can add as many ext.position("name", x, y, cx, cy, screen) commands as needed for each window in each of the luas.  

Posted

Thanks, Thats what I have been trying to do and have been playing with the same type of Lua.

 

I have been setting up a flight then putting all the panels eg gps , Radio etc back onto my primary screen before saving so when I reload the flight They are all sitting there and I have been  pressing  a key that runs a lua script that is similarto your script  to try to put them back to the correct screens but no luck. I presume the Name "GPS  /Radio" is exactly the same as the name on the View Instrument Panel Menu and the screen No is the number generated when you use identify from the windows display menu.

 

Owen

Posted

Owen,

12 minutes ago, OwenM said:

I presume the Name "GPS  /Radio" is exactly the same as the name on the View Instrument Panel Menu and the screen No is the number generated when you use identify from the windows display menu.

Yes, exactly.. (page 14-15 FSUIPC Lua Library.pdf) Except, I get the panel name from the panel.cfg to make sure there is no errors caused by display formatting etc..
To see if there are any lua errors you could use the FSUIPC logging, with a second (or more) monitors it is awesome!
FSUIPC is the best thing ever created for flight simming ))
4%20(2).jpg?dl=1

Roman

Posted

Thanks Roman. I will try a bit harder. I agree FSUIPC is a great tool and once you get the hang of Lua it is amazing what you can do

 

Owen

Posted
 

The Lua ext library, added in the most recent update (4.747) can position and size UNDOCKED panel windows on specific monitors. So you could do it by saving flights with the panel windows undocked (they come back that way too), and having Lua scripts running via aircraft- or profile-specific [Auto] sections which then move the undocked windows around (identified by title). You need also to download the Lua library package (again), for the updated documentation.

I've not found a way (yet) of operating the 'dock' and 'undock' options on panels by program, but I am working on it. I think it should work via a WM_COMMAND message, as that's normally how pop-up menus operate, so I'm experimenting down that route.

[LATER]

Your inquiry spurred me on. I've found out how to Undock a specific docked but visible panel window, as long as you know its name (title). So I'll be adding an ipc.undock function in the next update. (No "dock" or "re-dock" though -- can't find how to do thast. But I doubt that's so important).

 

I found this in a earlier post Peter is that Possible and if so what is the syntax to undock say the GPS window i tried ipc.undock("GPS")  but that didn't work and I cant find it anywhere in the Lua documentation. 

 

I have found that if I save the flight with all the windows undocked then run the lua script to place them that works but I thing an undock command would be tidier.

and lastly can I then force an "ALT Enter" from my Lua script

 

Thanks for all your help

 

Owen

 

Thanks for all the help guys 

Posted
4 hours ago, OwenM said:

I found this in a earlier post Peter is that Possible and if so what is the syntax to undock say the GPS window i tried ipc.undock("GPS")  but that didn't work and I cant find it anywhere in the Lua documentation.

Sorry, I don't recall this. Can you give me a link to where this was discussed?

There's no dock/undock facilities in the Lua library at present. I'm not sure how we would do it, assuming it is possible programmatically. It would be effectively duplicating the window content in a different class (different WndProc -- "FS98CHILD" <-> "FS98FLOAT"), so it really needs FS/P2D to do it for you -- i.e. you have to activate the right-click undock option.

If I knew how to do it once, then, sorry, I've forgotten! (Old Age problem).

Pete

 

Posted

I found that in a forum somewhere but couldnt find it again at the moment. I have it all working pretty nicely now using undocked panels then a lua script to place them then  ALT Enter and its all good.

I did ask if you knew of a way to send the Alt Enter command with IPC.keypress

 

Thanks

 

Owen

 

Posted
6 minutes ago, OwenM said:

I did ask if you knew of a way to send the Alt Enter command with IPC.keypress

It might work using the documented codes -- keycode 13, shift code 16. But as it says, the Alt key might instead or as well invoke the menu.

1 minute ago, OwenM said:

I found the stuff about undock click on the six replies its in there

Okay, I'll take a look. see if it helps me remember how to do it.  Back 9 years ago it was likely via a hack into FS code. I'm not doing that any more.

Pete

Posted

Okay, I found the undock function. It is in the Lua ext library, so it is

x = ext.undock("name")

Somehow it missed being added to the Lua library documentation! Very strange. Sorry about that. It needs testing on P3D though -- I think that code dates to 2011.

Maybe it wasn't added because it doesn't really fit. the "ext" library is all about external processes, not child windows of the simulator. Maybe it should be in the ipc library after all, as I seem to have originally proposed. I'll discuss it with John before firming it via documentation.

The name is the title of the docked window. You'd need to undock it manually to see the title in its title bar if you don't know it already.If the window is found, x is non-zero, if x is zero it means the Window couldn't be found.

Pete

 

 

 

  • Thanks 1
Posted

We won't be adding it to the documentation. I've done some tests here on P3Dv5 with some default panels, and it doesn't work. in fact it can hang P3D completely. The function will probably be removed in future updates of FSUIPC6.

If a reliable way of doing it by program is ever found then we'll look at adding it when time permits.

If it works with FSUIPC4 on FSX or P3D1-3 then by all means go ahead and use it. We won't be changing FSUIPC4.

Pete

 

  • Like 1
Posted

That makes total sense to remove it from future versions.

I have my panel placement all working perfectly and with the addition of a sleep (5000) the Keypress function to force an Alt Enter it is a very tidy way to display all the panels across 3 screens.

 

Thanks for your help

 

Owen Moore

Posted

Last question on this topic I promise

I have been able to force an Alt Enter from Lua but have struggled with forcing a Shift1 to shift8  from Lua.

I have looked at all lua documentation trying to find the value of "Shifts portion of ipc.Keypress to no avail.

At the moment I am saving my flights with all the windowed panels displayed then use my lua script to place them and move into fullscreen mode.

Thought it would be nice to have Flight start with aircraft on runway then display panels , move them and then move to fullscreen all with my Lua script. 

Displaying them with Lua has beaten me

 

Thanks

Owen Moore

 

Posted
3 hours ago, OwenM said:

lua documentation trying to find the value of "Shifts portion of ipc.Keypress to no avail.

Do you not see the information "The Advanced User’s guide gives a list of keycodes and shifts." in the Lua librarry documentation for ipc.keypress?

Pete

 

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.