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.

Toggle Jetway Gauge

Featured Replies

I want to make a gauge to toggle the jetway. I see there is a KEY_TOGGLE_JETWAY (KEY_ID_MIN + 1159)and a toggle_jetway key event. How can I make a gauge to do this? What does the (KEY_ID_MIN + 1159) mean? I can't find any definition of KEY_ID_MIN. Thanks, regards, Bob.

  • Moderator
I want to make a gauge to toggle the jetway. I see there is a KEY_TOGGLE_JETWAY (KEY_ID_MIN + 1159)and a toggle_jetway key event. How can I make a gauge to do this? What does the (KEY_ID_MIN + 1159) mean? I can't find any definition of KEY_ID_MIN. Thanks, regards, Bob.
KEY_TOGGLE_JETWAY is the C gauge equivalent of the XML script command:(>K:TOGGLE_JETWAY)The (KEY_ID_MIN + 1159) is the FS internal offset number, and really has no relevance at all for gauge programming or gauge scripting...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Hi Bill. Thanks. I have tried making this gauge with no success. Perhaps you could please look at it and tell me what is wrong with it. I am a novice at XML as you can see. <Gauge Name="Bob_Airport_Dock" Version="1.0"> <Value>(A:Toggle Jetway,bool)</Value> <Case Value="0"> <Image Name="switch_on.bmp" ImageSizes="40,61"/> </Case> <Case Value="1"> <Image Name="switch_off.bmp" ImageSizes="40,61"/> </Case> </Select> </Element> <Mouse> <Tooltip ID="">Toggle Jetway</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click Event="TOGGLE_JETWAY"/> </Mouse></Gauge>I have the two bmp's (switch_on.bmp and switch_off.bmp) in the same folder and they are both 40,61 in size. Best regards, Bob.

  • Moderator

Although not strictly necessary, I prefer for the sake of uniformity to wrap up the background image in an <Element> construct, and include a <Position> tag.Also, you have a closing </Element> tag without the corresponding opening <Element> tag.Here is how I prefer to structure such an XML script:

<Gauge Name="Bob_Airport_Dock" Version="1.0">  <Element>	<Position X="0" Y="0"/>	<Image Name="switch_off.bmp"/>  </Element>  <Element>	<Position X="0" Y="0"/>	<Select>	  <Value>(A:Toggle Jetway,bool)</Value>	  <Case Value="0">		<Image Name="switch_on.bmp"/>	  </Case>	  <Case Value="1">		<Image Name="switch_off.bmp"/>	  </Case>	</Select>  </Element>  <Mouse>	<Tooltip>Toggle Jetway</Tooltip>	<Cursor Type="Hand"/>	<Click Event="TOGGLE_JETWAY"/>  </Mouse></Gauge>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Hi Bill. Thanks so very much. I really appreciate the help. Best regards, Bob.Update: I had the bmp names reversed. I wanted it off when not toggled and on when toggled. I made these changes. The Tooltip works OK but it does not toggle and the jetway does not extend or retract using the toggle switch. It does with CTRL-J. CTRL-J does not toggle the gauge either. What is wrong? Here's my code now:<Gauge Name="Bob_Airport_Dock" Version="1.0"> <Element> <Position X="0" Y="0"/> <Image Name="switch_off.bmp"/> </Element> <Element> <Position X="0" Y="0"/> <Select> <Value>(A:Toggle Jetway,bool)</Value> <Case Value="0"> <Image Name="switch_off.bmp"/> </Case> <Case Value="1"> <Image Name="switch_on.bmp"/> </Case> </Select> </Element> <Mouse> <Tooltip>Toggle Jetway</Tooltip> <Cursor Type="Hand"/> <Click Event="TOGGLE_JETWAY"/> </Mouse></Gauge>Thanks and best regards, Bob.

  • Moderator

Bob, never having used the key event myself, I have no idea whether it works or not......although based on your report, apparently it does not... work, that is. :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
Bob, never having used the key event myself, I have no idea whether it works or not......although based on your report, apparently it does not... work, that is. :(
Hi Bill. OK. Thanks. Should the gauge have toggled from off to on with the code above? Is there a way to emulate the CTRL-J keystroke which does work? Best regards, Bob.
  • Author

If anyone is interested here is one I made that does work.<Gauge Name="Jetway" Version="1.0"> <Element> <Select> <Value>(G:Var1,bool)</Value> <Case Value="0"> <Image Name="switch_on.bmp" ImageSizes="30,45"/> </Case> <Case Value="1"> <Image Name="switch_off.bmp" ImageSizes="30,45"/> </Case> </Select> </Element> <Mouse> <Cursor Type="Hand"/> <Click>(G:Var1) ! (>G:Var1) 0 (>K:TOGGLE_JETWAY)</Click> <Tooltip ID="">Toggle Jetway</Tooltip> <Help ID=""/> </Mouse></Gauge>I don't know why the other one did not work. Regards, Bob.

  • Moderator

Hi Bob,I was so busy looking at the structure, I never even noticed that there's no such "read variable" as:(A:Toggle Jetway,bool)In other words, you cannot simply put an A: in front of a key_event and have it work... :( That's why it is so important to actually look through the two files in the SDK:Simulation Variables.htmlEvent IDs.htm

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
Hi Bob,I was so busy looking at the structure, I never even noticed that there's no such "read variable" as:(A:Toggle Jetway,bool)In other words, you cannot simply put an A: in front of a key_event and have it work... :( That's why it is so important to actually look through the two files in the SDK:Simulation Variables.htmlEvent IDs.htm
Hi Bill. Thanks. The SDK is not really written for novices like myself. I'll retry looking there. Best regards, Bob.
  • Moderator

The Simulation Variables are "tell me what this value is" tokens. They are "read only."The Event IDs are the "do this command" statements. They are "action commands."

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
The Simulation Variables are "tell me what this value is" tokens. They are "read only."The Event IDs are the "do this command" statements. They are "action commands."
Hi Bil. Thanks to you I am slowly learning XML. Best regards, Bob.

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.