• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Messages
4
Country
denmark
Hi I am working on how to be able to link a HID Macro button to a certain gauge or the other way around

I am VERY new to coding and such, and are beaten by the confusing situation regarding coding gauges and macros

I am trying to code a macro to my APU gauge in my flightsim FSX

I did find a default FSX command to toggle APU, but my gauge wont react to the command

I am using a spare keyboard so I cant tell if a command is working without the gauge activating also as a ref

Any help is much appreciated
 
HID Macro script:
HIDMacros.FSXEvent "APU_GENERATOR_SWITCH_SET", 0

APU gauge code:
<Gauge Name="APU_GENERATOR_SWITCH" Version="1.0">
<Element>
<Select>
<Value>(L:APUPower,bool)</Value>
<Case Value="0">
<Image Name="LSWITCH_UP.bmp" ImageSizes="22,36"/>
</Case>
<Case Value="1">
<Image Name="LSWITCH_DOWN.bmp" ImageSizes="22,36"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Left="30" Right="70" Top="30" Bottom="70">
<Cursor Type="Hand"/>
<Click>
(L:APUPower,bool) ! (>L:APUPower,bool)
(L:APUPower,bool) 1 == if{ 1 (>K:APU_STARTER) 1 (>K:APU_GENERATOR_SWITCH_SET) 1 (>L:SIMPLE_APU_BLEED,number) }
(L:APUPower,bool) 0 == if{ 0 (>K:APU_GENERATOR_SWITCH_SET) (>K:APU_OFF_SWITCH) 0 (>L:SIMPLE_APU_BLEED,number) }
</Click>
<Tooltip>%((L:APUPower,bool) 1 ==)%{if}APU (ON)%{end}%((L:APUPower,bool) 0 ==)%{if}APU (OFF)%{end}</Tooltip>
</Area>
</Mouse>
</Gauge>
 
I also tried to edit the gauge to something simple first:
<Gauge Name="APU_GENERATOR_SWITCH" Version="1.0">
<Element>
<Select>
<Value>(L:APU_STARTER, Bool) </Value>
<Case Value="0">
<Image Name="LSWITCH_UP.bmp" ImageSizes="22,36"/>
</Case>
<Case Value="1">
<Image Name="LSWITCH_DOWN.bmp" ImageSizes="22,36"/>
</Case>
</Select>
</Element>
<Mouse>
<Tooltip ID="">APU_GENERATOR_SWITCH</Tooltip>
<Help ID=""/>
<Cursor Type="Hand"/>
<Click Event="APU_GENERATOR_SWITCH_TOGGLE"/>
</Mouse>
</Gauge>

HID Macro script:
HIDMacros.FSXEvent "APU_GENERATOR_SWITCH_TOGGLE", 0
 
First, determine the specific gauge you want to link to a macro. Gauges in flight simulators are typically coded using XML or a similar markup language. Locate the gauge file corresponding to the APU gauge you want to control. This file usually has a .xml extension and can be found in the aircraft's panel folder. Managing and maintaining the organization's IT infrastructure, including servers, networks, and databases, can be outsourced to specialized service providers. They can ensure the infrastructure's stability, security, and scalability mlsdev.com/blog/outsourced-it-services-guide
 
Last edited:
Back
Top