October 10, 201213 yr All guru's I have a click statement that i want to control with an (L:var) e.g. as a repeater. I have the following code and want the click statement executed (L:var) times. The following code has 19 positions and with every click it advances one position. Is it possible to control it via an L:var to jump right away to UHF-CH 15 or any other? <Macro Name="UHFPRESET"> (L:UHF-CH, enum) 18 == if{ 0 (>L:UHF-CH, enum) } els{ (L:UHF-CH, enum) ++ (>L:UHF-CH, enum) } </Macro> <Area Left="46" Right="66" Top="168" Bottom="195"> <Visible>(A:CIRCUIT AVIONICS ON, bool) 1 == </Visible> <Tooltip>DED Toggle Switch</Tooltip> <Cursor Type="UpArrow" Repeat="Yes"/> <Click Repeat="Yes">(L:ICP-MODE,enum) 1 == (L:ICP-SEQ3,enum) 2== && if{@UHFPRESET} </Click> </Area> Thanks in advance
October 11, 201213 yr Why not ( for Ch 15): <Click> (L:ICP-MODE,enum) 1 == (L:ICP-SEQ3,enum) 2 == and if{ 15 >L:UHF-CH,enum) } </Click> Jan "Beatus ille qui procul negotiis..."
October 15, 201213 yr Author Jan, Thanks for the response, unfourtunatly it doesn't work, herewith i sent the preset freq part of the radio. Hope it helpes? <Element> <Select> <Value>(L:UHF-MODE,enum) 1 == if{ 133.2 125.750 128.350 132.025 123.175 119.100 120.125 125.925 120.425 122.100 120.700 124.526 131.000 123.575 125.325 123.000 136.075 125.125 125.75 19 (L:UHF-CH,enum) case 100 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (> K:COM_RADIO_SET) } </Value> </Select> </Element> <!-- GRD SELECTION --> <Element> <Select> <Value>(L:UHF-MODE,enum) 2 == if{ 122.8 100 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (> K:COM_RADIO_SET) } </Value> </Select> </Element> Greetz Slammer
October 16, 201213 yr Hi, have something similar for a Tacan: An XY mode switch and a channel selection knob. May be you can do something with the code: <!--TACAN--> channel display <Element> <Position X="278" Y="713"/> <FormattedText X="35" Y="15" Bright="Yes" FontSize="14" Font="Quartz" Color="%('silver' 'gray' (A:CIRCUIT AVIONICS ON,bool) ?)" Adjust="CENTER" VerticalAdjust="CENTER"> <String>\{bo}%((A:CIRCUIT AVIONICS ON,bool))%{if}%((L:TACAN-CH,enum) s0 59 > l0 70 < and)%{if}---%{else}%((L:TACAN-CH,enum))%!03d!%{end}%{else}888%{end}</String> </FormattedText> </Element> <Macro Name="tacan">100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV2_RADIO_SET)</Macro> click <Area Left="250" Right="265" Top="715" Bottom="740"> <Tooltip>CH-XY-MODE Switch</Tooltip> <Cursor Type="Hand"/> <Click Kind="LeftSingle+RightSingle" Repeat="Yes"> (M:Event) 'LeftSingle' scmp 0 == if{ (L:CH-XY-MODE,bool) ! (>L:CH-XY-MODE,bool) (L:TACAN-CH,enum) 60 < if{ (L:CH-XY-MODE,bool) if{ (L:TACAN-CH,enum) 1063 + 10 / @tacan } els{ (L:TACAN-CH,enum) 1063.5 + 10 / @tacan } } els{ (L:TACAN-CH,enum) 69 > if{ (L:CH-XY-MODE,bool) if{ (L:TACAN-CH,enum) 1053 + 10 / @tacan } els{ (L:TACAN-CH,enum) 1053.5 + 10 / @tacan } } } } 1 (>L:button,enum) } (M:Event) 'RightSingle' scmp 0 == if{ (L:CH-XY-MODE,bool) ! (>L:CH-XY-MODE,bool) (L:TACAN-CH,enum) 60 < if{ (L:CH-XY-MODE,bool) if{ (L:TACAN-CH,enum) 1063 + 10 / @tacan } els{ (L:TACAN-CH,enum) 1063.5 + 10 / @tacan } } els{ (L:TACAN-CH,enum) 69 > if{ (L:CH-XY-MODE,bool) if{ (L:TACAN-CH,enum) 1053 + 10 / @tacan } els{ (L:TACAN-CH,enum) 1053.5 + 10 / @tacan } } } } 1 (>L:button,enum) } </Click> </Area> <Area Left="330" Right="370" Top="700" Bottom="740"> <Tooltip>CH-SEL KNOB</Tooltip> <Cursor Type="Hand"/> <Click Kind="WheelUp+WheelDown+LeftSingle+RightSingle" Repeat="Yes"> (M:Event) 'WheelUp' scmp 1 == (M:Event) 'LeftSingle' scmp 1 == or or if{ (L:TACAN-CH,enum) ++ 126 min } els{ (L:TACAN-CH,enum) -- 17 max } (>L:TACAN-CH,enum) (L:CH-XY-MODE,bool) (L:TACAN-CH,enum) 60 < and if{ (L:TACAN-CH,enum) 1063 + 10 / @tacan } (L:CH-XY-MODE,bool) ! (L:TACAN-CH,enum) 60 < and if{ (L:TACAN-CH,enum) 1063.5 + 10 / @tacan } (L:CH-XY-MODE,bool) (L:TACAN-CH,enum) 69 > and if{ (L:TACAN-CH,enum) 1053 + 10 / @tacan } (L:CH-XY-MODE,bool) ! (L:TACAN-CH,enum) 69 > and if{ (L:TACAN-CH,enum) 1053.5 + 10 / @tacan } </Click> </Area> Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment