Accessing custom events in XML gauges

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
Tadghostal
Posts: 14
Joined: Mon Jan 27, 2020 10:18 pm

Accessing custom events in XML gauges

Post by Tadghostal »

I know from the SDK documentation that we can access custom events in the range of eventIDs 0x11000 to 0x1FFFF through both simconnect and c++ gauges, but I was wondering if it is also possible through xml gauges? I would like to set a value on a custom event when the user clicks in the mouse area xml gauge and have that event and value picked up in a simconnect client.

So is it possible in the xml gauge to do something like (emphasis on bold and italic part):

<MouseArea id="InterfaceArea">
<FloatPosition>0.000,106.00</FloatPosition>
<Size>1024,494</Size>
<CursorType>None</CursorType>
<MouseClick id="MouseAction">
<Script>
(M:Event) 'LeftSingle' scmp 0 == if{ (M:x) (&gt;K:0x1100A) }
</Script>
<ClickType>LeftSingle</ClickType>
</MouseClick>
</MouseArea>
superman32870
Posts: 1
Joined: Tue Sep 25, 2012 4:00 pm

Re: Accessing custom events in XML gauges

Post by superman32870 »

Take a look at the Lua scripting in the SDK. That might be a way to go.
Post Reply