Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

Hi John,  you answered in another thread

You said :

"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

 

Posted

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

Posted

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

 

 

Posted
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

Posted
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

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.