April 6, 201115 yr HiI am working on a project, in which I want a few complex aircraft controls (i.e. NAV2_RADIO_FRACT_DEC, or COM_STBY_RADIO_WHOLE_INCREASE ) to be executed on a single keypress.I was thinking about creating a gauge (or using the radio gauge itself) to "enslave" a key to execute that function, but I'm having a little trouble with it.My testing gauge for now is the nav lights gauge, to which I added a few lines after the <Mouse> event it had (that still works), but It doesn't work as it is (my guess: wrong code..ups) <Mouse> <Help ID="HELPID_GAUGE_LIGHT_SWITCH_NAV"/> <Cursor Type="Hand"/> <Click Event="TOGGLE_NAV_LIGHTS"/> </Mouse> <Keys> <On Key="m">"TOGGLE_NAV_LIGHTS"</On> </Keys></Gauge> Can someone help, please?Thank you..Ok, already found out what I did wrong with the code, and now use this: <Keys> <On Key="m">(>K:TOGGLE_NAV_LIGHTS)</On> </Keys>However, as noted on another thread, this kind of code (embeded in a gauge) only works if the panel where the gauge is placed is visible.How can I make it work independently of the panel being or not visible?(To be noted that I am using an aircraft which was not made by me - EADS Socata TB30 by Kilian Bernard)Thanks again
April 7, 201115 yr Add the gauge to a VCockpit section of the panel.cfg file. They load no matter the view. If you don't want it visible in the VC add a transparent version instead.Hope this helps, Tom Gibson CalClassic Propliner Page
April 9, 201115 yr Add the gauge to a VCockpit section of the panel.cfg file. They load no matter the view. If you don't want it visible in the VC add a transparent version instead.Hope this helps,Hi Tom,I'm afraid it has nothing to do with the gauge already loaded or not.For FS9, OnKey (unlike OnEvent) only works if the panel window in which the gauge is defined, is active (2D window of VC).For FSX, it's even worse: OnEVent doesn't work either if the window isn't active.To the OP:the only way I know of to do what you want, is to define the gauge with the OnKey code, in a panel window that you keep "forced" open all the time; meaning that you have to make an invisible gauge and place that in a transparant window.To keep that window "forced" open, you have to create an XML gauge that checks the window status (and place that in a VC section); when the window is closed (eg. after view switching), open it again. All based on the windowident of that window.However, in XML there's no way to test the open/closed status of a window, so this means you have to continuously give the Panel_Id_Open event; but this induces the infamous "continuous event" problem.To solve that, you need a gauge that tests the status of a panel window; like Doug Dawson's gauge dsd_window_status.gau.Rob
April 10, 201115 yr Author ThanksMy main problem was really to get the key to work, the other isn't so critical.Another thing: is it possible to assign a joystick key, or an axle, in the gauge XML code? If so, how can I do it?Thanks
April 10, 201115 yr ThanksMy main problem was really to get the key to work, the other isn't so critical.Another thing: is it possible to assign a joystick key, or an axle, in the gauge XML code? If so, how can I do it?ThanksNot that I know of..Rob
Create an account or sign in to comment