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 Syntax Help !

Featured Replies

Hello!I am a newbie in XML programming and certainly many of you will smile by reading my request, but I feel much better in Visual Basic and do not easily convert myself to this so unusual way of xml programming and syntax ;-)Here is my question:In the small FS XML gauge I have in mind, I have 2 variables to compare and to do an action if a value is obtained in their substraction:Here is a piece of my code:(G:Var1) if{ (G:Var3) (G:Var2) 300 - > if{ 1 (>K:GEAR_UP) } }What I want is that if the difference between VAR3-VAR2 is 300, I send a Gear_Up command to FS.This code above, works.But now, I want to add in the line a second comparison opposite to the first one, that is: G:Var2-G:Var3=300 with a OR statement. So in Visual basic, the code would be:If ((VAR3-VAR2=300) OR (VAR2-VAR3=300)) THEN GEAR_UPVery simple in Basic language, but I tried many times in XML and Cannot obtain what I need...Could anyone have the charity to help me to translate this so simple BASIC line into XML for FS ??Many thanks in advance!

Why don't you make the difference and remove the sign?If (ABS(VAR3-VAR2)>=300)) THEN GEAR_UP(G:Var1) if{ (G:Var3) (G:Var2) - abs 300 > if{ 1 (>K:GEAR_UP) } }Arne Bartels

What a so quick and really working answer !!It looks so simple.. I am ashamed! I really need a good training.Many thanks to you Arne.

Or even better (to avoid the "continuous event" bug):(G:Var1)if{ (G:Var3) (G:Var2) - abs 300> if{ (A:GEAR HANDLE POSITION,bool) if{ (>K:GEAR_UP) } }}I.o.w.: the GEAR_UP event is only given when needed.Cheers, Rob Barendregt

Thanks to all of you... it works fine !

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.