Welcome to Cockpitbuilders.com. Please login or sign up.

April 24, 2024, 11:23:55 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
348 Guests, 0 Users
Members
  • Total Members: 4,154
  • Latest: xyligo
Stats
  • Total Posts: 59,641
  • Total Topics: 7,853
  • Online today: 393
  • Online ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 348
Total: 348

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

XML to Lua ??

Started by Stinger2k2, February 27, 2019, 09:55:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stinger2k2

Hi Guys and thanks for looking,
I have found the following XML code in a gauge.cab which operates
a keypad on a Garmin GCU477.(The code is only for the letter A, there
is more covering the rest of the alphabet)

I didn't find anything on a FSUIPC/LINDA trace so somehow I am
looking to use this code but operate it from a hardware button.

My question is this....Can I use part of this code directly as a Lua script?
If not, what do I need to do to have it operated from a joystick button?

I am fairly conversant in Lua and have many other buttons operating other
functions.

Here's the code....

<MouseArea id="Letter A">
      <FloatPosition>16.000,151.000</FloatPosition>
      <Size>45,30</Size>
      <CursorType>Hand</CursorType>
      <MouseClick id="MouseClick">
         <Script>65 chr (&gt;@c:IcaoSearchEnterChar) 1 (>L:BUFFER_BTN_FMC,number)</Script>
         <ClickType>LeftSingle</ClickType>
         <ClickRepeat>True</ClickRepeat>
      </MouseClick>
   </MouseArea>

Trevor Hale

#1
That looks to me like "KEY press to TO MOUSE function code"

The function of assigning a key press to a mouse location for clicking is easy to do with FSUIPC.
I am guessing the gauge your talking about has a button your supposed to use your mouse on to control the gauge.  If you try pressing the letter A on your keyboard I am guessing it will also control the gauge.
With that being said, I see no issues why you couldn't have the joystick button send keypress "A" when the joystick button is pressed..  Again this would be done in FSUIPC.
Trev

Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate