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.

Automatic repeating click statement

Featured Replies

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

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..."

  • 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

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

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.