Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML Keystrokes

Featured Replies

Hello all,I need a little help for a simply gauge, want a keystroke for this.Its a Warning Light Test Switch who returns automaticly after mouse klick released.I know about the <Key On> entrys for Keystrokes in XML, but what code i must fill in to following gauge ?

<Gauge Name="Warning_Test" Version="1.0">   <Element>	  <Select>		 <Value>(L:Test_W,bool)</Value>		 <Case Value="0">			<Image Name="Switch_3_Off.bmp" ImageSizes="37,62,0,0"/>		 </Case>		 <Case Value="1">			<Image Name="Switch_3_On.bmp" ImageSizes="37,62,0,0"/>		 </Case>	  </Select>   </Element>   <Mouse>	  <Area Bottom="31">		 <Cursor Type="UpArrow"/>		 <Click Kind="LeftSingle+LeftRelease">(L:Test_W, bool) ! (>L:Test_W, bool)</Click>	  </Area>	  <Area Top="32">		 <Cursor Type="Hand"/>		 <Click>0 (>L:Test_W,bool)</Click>	  </Area>   </Mouse></Gauge>

so <Keys> <On Key="74"> (what code here?) </On> </Keys></Gauge>thanks !Tom

  • Moderator
I know about the <Key On> entrys for Keystrokes in XML, but what code i must fill in to following gauge ?
Simply repeat the same command as you use for the mouse click! ;)
  <Keys>	<On Key="74">			(L:Test_W, bool) ! (>L:Test_W, bool)	</On>  </Keys>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Hi Bill,thanks,

  <Keys>	<On Key="74">			(L:Test_W, bool) ! (>L:Test_W, bool)	</On>  </Keys>

I

Hi Tom,this code toggles for example a window with the key X ( 88).If you put in your toggle variable in the script field, the X key will toggle it.<?xml version="1.0" encoding="UTF-16"?><SimBase.Document Type="AceXML" version="1,0"> <Descr>AceXML Document</Descr> <Filename>test.xml</Filename> <SimGauge.Gauge ArtDirectory="."> <FloatPosition>0.000,0.000</FloatPosition> <Size>25,25</Size> <KeyMap id="KeyMap"> <Trigger id="Trigger"> <KeyboardKey>88</KeyboardKey> <script>1010 (> K:PANEL_ID_TOGGLE) </Script> </Trigger> </KeyMap> </SimGauge.Gauge></SimBase.Document>This code has been generated by the ACE tool. Dietmar

  • Author

Hello Dietmar,Thanks,I

HI Tom,the code works as well to toggle a ( L:variable,enum) ! ( >L:variable,enum) if you put this into the script. Do you use the ACE tool ? Are you FSX SP2 ?With ACE you just select the Key Map, and than the Tigger. It is just a minute to generate this XML with ACE.Dietmar

  • Author

Hi Dietmar,Oh, i

  • Moderator
ACE Tools- XML with a few mouseclicks-sounds great !, but the Tool is only for FSX :( , right ?Tom,
ACES tool produces XML that will ONLY work with FSX.FS9 XML syntax schema will work with both FS9 and FSX, which is why that's pretty much all I'll use.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi Tom,Bill is right. However, may be my FSX example can give you some help for your FS9 code .Dietmar

  • Author

Hi Bill and Dietmar !,thanks a lot for your assistancei got it ! ( big,big thanks :( to "edi" who wrote this code)it works with a counter, something new for me as a "newbie" in XML :(

<Gauge Name="Warning_Test" Version="1.0"></P> <P>!-- mouse begin --><Mouse>  <Tooltip ID="">%((L:Test_W,number))%{case}%{:0} L: Test start %{:1} Test running %{end}</Tooltip>  <Cursor Type="Hand"/>  <Click Kind="LeftSingle+Rightsingle" >  (M:Event)    'LeftSingle' scmp 0 ==     (L:Test_Counter,number) 0 ==    && if{ 1 (>L:Test_W,number) 20 (>L:Test_Counter,number) }  </Click></Mouse><!-- mouse ende --></P> <P>  <Keys> <On Key="70">   (L:Test_Counter,number) 0 ==   if{	20 (>L:Test_Counter,number)	1 (>L:Test_W,number)	} </On>  </Keys></P> <P><!-- output begin -->  <Element> <Select>   <Value>	(L:Test_Counter,number) 0 >	if{	  (L:Test_Counter,number) -- (>L:Test_Counter,number)	  }	(L:Test_Counter,number)  ==	if{ 	  0 (>L:Test_W,number)	  }	(L:Test_W,number)    </Value>   <Case Value="0"><Image Name="Switch_3_Off.bmp"  Bright="Yes"/></Case>   <Case Value="1"><Image Name="Switch_3_On.bmp"  Bright="Yes"/></Case> </Select>  </Element>

Tom

  • Moderator

Try this:

  <Keys>	<On Key="70">			(L:Test_W, bool) 0 ==			if{ 1 (>L:Test_W, bool) }			els{ 0 (>L:Test_W, bool) }	</On>  </Keys>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.