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 has beaten me!

Featured Replies

Please Help! I am trying to make a speedbook gauge - basically a bitmap on the panel with the landing speeds etc which changes automatically with weight... I thought it would be easy - I was wrong!!Please could somebody tell me the correct syntax for the <visible> line which will make the bmp below show only when the total aircraft weight is greater than 26500 kg and less than 27500kg... I believe from reading tutorials and websites for the best part of three hours that it should be something like this (at least this would be the greater than part and then the next bmp copuld overlay it)...<element><visible>26500 (A:total weight, Kg) ></visible><image name="blahblah.bmp"/></element>I was able to get this working for altitude so I think firstly there is something wrong with "total weight, Kg" but I have checked in the tutorial threads and these should be correct...Once I actually get it reading the weight properly, I assume that to get my visible "range" I will need to code something like this...<visible>(26500 (A:total weight, Kg) >) (27499 (A:total weight, Kg) <) * )</visible>Am I right? It works like an AND gate 0x0=0x1=1x0=0 but 1x1=1 ??Cheers for any help!Geoff

Hi,Not tested, but try:<visible>26500 (A:total weight, Kg) > 27499 (A:total weight, Kg) < and</visible>Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Geoff. Try the 'range' variable rng thus:-

<visible>26500 27499 (A:total weight, Kg) rng</visible>

Regards, Ted.

  • Author
Geoff. Try the 'range' variable rng thus:-
<visible>26500 27499 (A:total weight, Kg) rng</visible>

Regards, Ted.

Working - excellent - thanks very much for your help!Geoff
  • Moderator

Either Jan's or Ted's method will work. :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Thanks once again for the help - the speedbook is working perfectly now :)I have a couple of other things I am trying (some click-spot overlays to get rid of icons and a gauge backlight / panel floodlight overlay) and had a few more questions that I'm sure somebody here will know the answers to:- If I make a mouse click spot as follows, is $$$ the same panel ID number I would find in the panel.cfg file? <Mouse><Area Left="XXX" Top="YYY" Width="xxx" Height="yyy"><Cursor Type="Hand"/><Click>$$$ (>K:PANEL_ID_TOGGLE)</Click></Area></Mouse>- If I change the operation line to <Click>(A:LIGHT WING, bool) ! (>A:LIGHT WING, bool)</Click>, this is now a toggle for the wing lights or have I got it wrong?- Related to the above, if this is overlayed on top of an existing dummy switch in a panel, will the click be "captured" or "monitored"? To clarify, will the dummy switch also operate and if not, is there a way to code it so that it does?- What code do I put into the <Click></Click> command so that when I click in the box, the event of pressing the TAB key is sent (TAB is, I believe key 09)?- Last one! Are the following two lines correct to only show the gauge when the a.) the master battery and avionics are live and b.) also the panel light?a.) <Visible>(A:ELECTRICAL MASTER BATTERY, bool) (A:CIRCUIT AVIONICS ON, bool) &</Visible>b.) <Visible>(A:LIGHT PANEL, bool) (A:ELECTRICAL MASTER BATTERY, bool) (A:CIRCUIT AVIONICS ON, bool) &&</Visible>Sorry for asking lots of questions - playing around with panels and gauges is lots of fun! If you could point me in the direction of some tutorials which cover these that would be awesome too! I have so far looked at the one at the top of this forum which details how the syntax works and also looked at the tutorials at fs2x but still couldn't be sure with the above... Thanks in advance,Geoff

  • Moderator
- If I make a mouse click spot as follows, is $$$ the same panel ID number I would find in the panel.cfg file? <Mouse><Area Left="XXX" Top="YYY" Width="xxx" Height="yyy"><Cursor Type="Hand"/><Click>$$$ (>K:PANEL_ID_TOGGLE)</Click></Area></Mouse>
Yes.
- If I change the operation line to <Click>(A:LIGHT WING, bool) ! (>A:LIGHT WING, bool)</Click>, this is now a toggle for the wing lights or have I got it wrong?
No. All "A:somethings" are read-only variables. You must use the list of Event IDs (Key_events) supplied in the SDK for "commands."<Click>(>K:TOGGLE_WING_LIGHTS)</Click>
- Related to the above, if this is overlayed on top of an existing dummy switch in a panel, will the click be "captured" or "monitored"? To clarify, will the dummy switch also operate and if not, is there a way to code it so that it does?
An "overlay gauge" will over-ride the operations of the gauge underneath.
- What code do I put into the <Click></Click> command so that when I click in the box, the event of pressing the TAB key is sent (TAB is, I believe key 09)?
None. Keyboard commands are not supported
- Last one! Are the following two lines correct to only show the gauge when the a.) the master battery and avionics are live and b.) also the panel light?a.) <Visible>(A:ELECTRICAL MASTER BATTERY, bool) (A:CIRCUIT AVIONICS ON, bool) &</Visible>b.) <Visible>(A:LIGHT PANEL, bool) (A:ELECTRICAL MASTER BATTERY, bool) (A:CIRCUIT AVIONICS ON, bool) &&</Visible>
Both of the above are "almost" correct.The correct syntax is one of the following:and - && - &&Frankly, I much prefer using the simple "and" rather than the alternatives! I would also use AVIONICS MASTER SWITCH instead of the CIRCUIT AVIONICS ON variable.a.) <Visible>(A:ELECTRICAL MASTER BATTERY, bool) (A:AVIONICS MASTER SWITCH, bool) and</Visible>b.) <Visible>(A:LIGHT PANEL, bool) (A:ELECTRICAL MASTER BATTERY, bool) (A:AVIONICS MASTER SWITCH, bool) and and</Visible>

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.