December 12, 200916 yr 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
December 13, 200916 yr 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
December 13, 200916 yr Author Hi Bill,thanks, <Keys> <On Key="74"> (L:Test_W, bool) ! (>L:Test_W, bool) </On> </Keys> I
December 13, 200916 yr 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
December 13, 200916 yr 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
December 14, 200916 yr 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
December 14, 200916 yr Hi Tom,Bill is right. However, may be my FSX example can give you some help for your FS9 code .Dietmar
December 14, 200916 yr 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
December 14, 200916 yr 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