Alhard Horstmann Posted December 10, 2022 Report Posted December 10, 2022 Hello, here again a challanging question: How can I toggle with ONE controler button between two P3D views? E.g.: View 1 is Steering Wheel view and View 2 is Cockpit View. The View assignments in P3D are known to me. Is it possible with standard FSUIPC functions or must I program a LUA sequence? Alhard
Alhard Horstmann Posted December 11, 2022 Author Report Posted December 11, 2022 Hello, I found the solution in doc "Advanced User Guide" on Page 21/22. I used the Flag Toggle function. C1005. thanks for reading.
John Dowson Posted December 12, 2022 Report Posted December 12, 2022 Sorry for delay...and glad you found a solution! John
Alhard Horstmann Posted December 12, 2022 Author Report Posted December 12, 2022 Hi John, delay is ok. You are a business man, I am retired with much time. 😄 Now I have a new problem. I want to set the focus on a P3D view. All focus functions in FSUIPC or LUA are changing WIN applications focus, but not a "sub window", a P3D view! When I toggle between camera in a view, I first have to c!ick with the mouse on that view, that the view is getting focus. Alhard
John Dowson Posted December 12, 2022 Report Posted December 12, 2022 I've had visitors for the past 4-5 days and so not had much time for support... I answered in your other post on this - FSUIPC has no knowledge of any P3D windows except the main one, so I don't think this is possible. John
Alhard Horstmann Posted December 12, 2022 Author Report Posted December 12, 2022 Hi John, you answered in another thread You said : Posted 22 minutes ago "FSUIPC only knows the window handle of the main P3D window, so it is not possible to give the focus to any other P3D window I'm afraid. John" Thanks for your quick response . So I have to continue my investigations, also with LUA. As I was a programmer and in earliear times a software developper, I think there should be a solution. I put my question also in the P3D forum. Help is still welcome. Alhard
John Dowson Posted December 13, 2022 Report Posted December 13, 2022 Maybe you could use the windows keyboard shortcut to cycle through application windows...i.e. restore focus to the FS, and then send the appropriate windows key shortcut to cycle through its windows? Not sure what that shortcut key combination is, but google can help with that... There is/was an FSUIPC control to List all FS windows, but looking at the code this has actually been removed in FSUIPC6 and FSUIPC7 (and possibly other versions), so I don't think its possible for FSUIPC to know anything about FS windows, John
Alhard Horstmann Posted December 13, 2022 Author Report Posted December 13, 2022 Hi John, thanks for your help. I think , I have tools for identifying FS WIndows. I keep you informed. So, another question in this context: This is a part of my FSUIPC6.log : 149265 LUA.3: beginning "P:\Modules\ah ChgFocus V2.lua" 149406 Button changed: bRef=0, Joy=0, Btn=13, Released 149406 [Buttons.Beech Baron 58 Paint1] 12=U0,13,CL11:K,0 150812 Button changed: bRef=0, Joy=0, Btn=11, Pressed 150812 [Buttons.Beech Baron 58 Paint1] 13=P0,11,CL7:R,0 I don't know what "CL11:K" or "CL7:R" means. Didn't find in FSUIPC documentation. Alhard
John Dowson Posted December 13, 2022 Report Posted December 13, 2022 28 minutes ago, Alhard Horstmann said: I don't know what "CL11:K" or "CL7:R" means. Didn't find in FSUIPC documentation. CL indicates the button is assigned to a Lua script control, and the following number is the index number of the lua file under your [LuaFiles] section of your FSUIPC6.ini. The letter after the colon is the lua control, with K indicating LuaKill and R indicating just Lua (shorthand for Lua Run). There are also other letters for the other Lua Controls - LuaSet, LuaDebug, LuaToggle, LuaValue and LuaClear. The comment on the button assignment line will tell you the lua dile name and lua control used. John
Alhard Horstmann Posted December 13, 2022 Author Report Posted December 13, 2022 Great, I know a lot about LUA, but this is new to me. I used LUA often in the past years. Where is it documented? Now I am using WindowManager ( https://www.desksoft.com/ ) for finding the FS Windows properties with success. here I attach a screenshot of my early findings Alhard
John Dowson Posted December 13, 2022 Report Posted December 13, 2022 8 minutes ago, Alhard Horstmann said: Great, I know a lot about LUA, but this is new to me. I used LUA often in the past years. Where is it documented? It is not documented. Probably should be added to the FORMAT OF BUTTON DEFINITIONS section on page 18 of the Advanced User guide. But really this is internal to how FSUIPC works - you don't need to know about this. You just set this up in the assignments window. John
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now