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.

Storing String Data

Featured Replies

Bob, Works only in FSX.I tried fs9, but only 0. as result.Pity ++ Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Replies 41
  • Views 11.6k
  • Created
  • Last Reply

Top Posters In This Topic

Hi AllWorking with Dougs gauge and trying to use for multiple entries.n (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointIdent) (>C:FSX_STRINGS:hello:n)but (>C:FSX_STRINGS:hello:n) will not accept a macro or register in the number field to writ e to the gauge is this a FS problem?pve

Paul EGLD

Hi AllWorking with Dougs gauge and trying to use for multiple entries.n (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointIdent) (>C:FSX_STRINGS:hello:n)but (>C:FSX_STRINGS:hello:n) will not accept a macro or register in the number field to writ e to the gauge is this a FS problem?pve
Nope. That's a limit on the module's functionality. It's what made me think of building in support for arrays.FS passes everything to the right of "C:FSX_STRINGS:" in to the module as a single string.I can parse the string, looking for the colon character. However things start to get a little more ugly when I work out how to handle the creation and storage of the individual variables.Further, if the stuff to the right of the colon is "@SomeMacro" I can't do anything about evaluating the macro.The functionality of this approach will always be limited to evaluating XML expressions that C modules can handle. No G:Vars, no macros, no stack calls, etc. Basically just stuff that can be reached with A: K: L: P: and E: calls, along with actual numbers.I did get a bug in the string array storage routine fixed last night, so the module does now appear to be working pretty well. Doug

Latest version, as of 3:30pm, Sep 10, is here:http://www.fsdeveloper.com/forum/showthread.php?p=248413#post248413Post number 4. Doug

  • 1 month later...

Jan,

Hi, with this code in an xml.gauge
<!--<Launch.Addon>	<Name>FSX_STRINGS</Name>	<Disabled>False</Disabled>	<Path>fsx_string_storage.dll</Path></Launch.Addon>--> <Element>	<Select>    	<Value>        	(A:ATC FLIGHT NUMBER,string) (>C:FSX_STRINGS:String00)    	</Value>	</Select</Element><Element>	<Position X="0" Y="200"/>	<FormattedText X="200" Y="450" FontSize="40" Font="Arial" Color="RED" Adjust="CENTER" VerticalAdjust="Center">    	<String>        	%((C:FSX_STRINGS:String00))%!s!    	</String>	</FormattedText></Element>

i only get "0." Jan

I found I just got 0. too using a similar thing with the <LOAD.ADDON> element at the top of the gauge. I had a think.... and realised this: I'm not sure, but I think including the LAUNCH.ADDON works in an Aces generated gauge ? (can someone verify this) but it won't work in a bare bones hand crafted gauge - The gauge I tried the string storage in was hand crafted. The <LAUNCH.ADDON> element should actualy be included in FSXs dll.xml file. This file contains the instructions for loading addon modules at startup - FSUIPC adds an entry for itself into this file when you install it - as do other modules. So I added the LAUNCH.ADDON element into my dll.xml file. Upon starting FSX I got the 'do you want to run this module', I clicked RUN and then got the 'is this a trusted module', I clicked YES and the string storage now works fine in any XML gauge that I put it in. Hope this helps ! Dave Take a look at this webpage for info on how/where to find the dll.xml file: http://support.preci...leshooting.aspx

Dave, Thanks, but.... fs9!! Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Dave,Thanks, but....fs9!!Jan
Jan,I think I have it working in FS9. I sent it to your "chello" e-mail account. Does that still work? Doug

Doug, <Element><Select><Value>(A:ATC TYPE,string) (>C:FSX_STRINGS:String00)(A:ATC FLIGHT NUMBER,string) (>C:FSX_STRINGS:String01)(L:capt instr bus AC volts,number) (>C:FSX_STRINGS:String02)(L:Flood,enum) (>C:FSX_STRINGS:String03)</Value></Select></Element> <Element><Position X="10" Y="10"/><FormattedText X="200" Y="200" Bright="Yes" LineSpacing="20" FontSize="18" Font="Arial" Color="orange" Adjust="CENTER" VerticalAdjust="CENTER" ><String>\{bo}%((C:FSX_STRINGS:String00))%!s!\n%((C:FSX_STRINGS:String01))%!s!\n%((C:FSX_STRINGS:String02))%!s!\n%((C:FSX_STRINGS:String03))%!s!\n</String></FormattedText></Element> Gave: Boeing2125110 (cold and dark: 0)0 ( 1,2,3 moving the switch) In other words, it works!Thank you very much!Now looking for more intelligent applications. Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • 4 months later...
  • Commercial Member

Guys I'm looking for a solution to a little problem I'm having creating a page that lists all the Duplicate Waypoints. It provides data such as their FREQ if applicable and their LAT/LON. However I can not get the code to work consistently. The values often flicker on and off from 0.00.... to the actual value and back.Here is the code:

<Element><FormattedText X="275" Y="230" Bright="Yes" Font="Calibri" FontSize="15" Tabs="15,16L,55L,100L,265R,270R"Adjust="left" Color="%( (L:FMC-BRT,number) 0x7f + 0x100 * )%"  LineSpacing="15"  ><String>n{lsp=5}%('AWNVM' (>@c:IcaoSearchStartCursor)(L:FMC-UNIT-1,number) 0 != if{(L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr(L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr scat scat scat scat (>@c:IcaoSearchEnterChar) })%((@c:IcaoSearchMatchedIcaosNumber) s2)%(0 sp1)%((@c:IcaoSearchMatchedIcaosNumber) s2 0 >)%{if}%{loop}%(l1 (>@c:IcaoSearchMatchedIcao))nt%((@c:IcaoSearchCurrentIdent))%!s! %(l2)%!s!t%('AWNVM' (@c:IcaoSearchCurrentIcaoType) ord schr)%{case}%{:0}ARPT%((@c:IcaoSearchCurrentIcao) (>@c:WaypointAirportICAO))nttt%((@c:WaypointAirportLatitude) 0 > if{ 'N' } els{ 'S' })%!s!%((@c:WaypointAirportLatitude) abs flr)%!02d!°%((@c:WaypointAirportLatitude) /-/ (@c:WaypointAirportLatitude) /-/ int - 60.019236934915036870791920487336 /-/ *abs)%!02.1f!% %((@c:WaypointAirportLongitude) 0 > if{ 'E' } els{ 'W' })%!s!%((@c:WaypointAirportLongitude) abs flr)%!03d!°%((@c:WaypointAirportLongitude) /-/ (@c:WaypointAirportLongitude) /-/ int - 60.019236934915036870791920487336 /-/ *abs)%!3.1f!%{:1}ISEC%((@c:IcaoSearchCurrentIcao) (>@c:WaypointIntersectionICAO))nttt%((@c:WaypointIntersectionLatitude) 0 > if{ 'N' } els{ 'S' })%!s!%((@c:WaypointIntersectionLatitude) abs flr)%!02d!°%((@c:WaypointIntersectionLatitude) /-/ (@c:WaypointIntersectionLatitude) /-/ int - 60.019236934915036870791920487336 /-/ *abs)%!02.1f!% %((@c:WaypointIntersectionLongitude) 0 > if{ 'E' } els{ 'W' })%!s!%((@c:WaypointIntersectionLongitude) abs flr)%!03d!°%((@c:WaypointIntersectionLongitude) /-/ (@c:WaypointIntersectionLongitude) /-/ int - 60.019236934915036870791920487336 /-/ *abs)%!3.1f!%{:2}NDB%((@c:IcaoSearchCurrentIcao) (>@c:WaypointNDBICAO))n%((@c:WaypointNDBFrequency,KHz))%!4.1f!tt%((@c:WaypointNDBLatitude) 0 > if{ 'N' } els{ 'S' })%!s!%((@c:WaypointNDBLatitude) abs flr)%!02d!°%((@c:WaypointNDBLatitude) /-/ (@c:WaypointNDBLatitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!02.1f!% %((@c:WaypointNDBLongitude) 0 > if{ 'E' } els{ 'W' })%!s!%((@c:WaypointNDBLongitude) abs flr)%!03d!°%((@c:WaypointNDBLongitude) /-/ (@c:WaypointNDBLongitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!3.1f!%{:3}VOR%((@c:IcaoSearchCurrentIcao) (>@c:WaypointVORICAO))n%((@c:WaypointVORFrequency,MHz))%!3.2f!tt%((@c:WaypointVORLatitude) 0 > if{ 'N' } els{ 'S' })%!s!%((@c:WaypointVORLatitude) abs flr)%!02d!°%((@c:WaypointVORLatitude) /-/ (@c:WaypointVORLatitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!02.1f!% %((@c:WaypointVORLongitude) 0 > if{ 'E' } els{ 'W' })%!s!%((@c:WaypointVORLongitude) abs flr)%!03d!°%((@c:WaypointVORLongitude) /-/ (@c:WaypointVORLongitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!3.1f!%{:4}MARKER%{end}%(l1 ++ s1 l2 <)%{next}%{end}</String></FormattedText><Clip Top="50" Bottom="200"/></Element>

I was hoping I could store them to LVars and then it would work. Is this a feasible approach or am I missing something here. This is FS9 primarily but X too.

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

  • Author
I was hoping I could store them to LVars and then it would work. Is this a feasible approach or am I missing something here. This is FS9 primarily but X too.
Hi,Before having a look through your code, I have a simple question first. Are you wanting to store the Waypoint Ident and/or ICAO, that is, string data, as well as numbers such as frequency and lat/lon?Bob
  • Commercial Member

We'll to be honest I have no need to store them. I just figured that perhaps if I did store them the code would work like I am wanting it to.

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

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.