Jump to content
Sign in to follow this  
Propwash

Storing String Data

Recommended Posts

Doug, So the fsx_string_storage.dll in the Modules folder? The following code in one of my xml gauges? <Launch.Addon><Name>FSX_STRINGS</Name><Disabled>False</Disabled><Path>fsx_string_storage.dll</Path></Launch.Addon> (A:ATC TYPE, string) (>C:FSX_STRINGS:String00)<String>%((C:FSX_STRINGS:String00))%!s!</String> Jan
Jan,The Launch.Addon section is just for FSX, to get the module to load. You won't need it for FS9.Yes, the .dll will need to go in the modules folder. Doug

Share this post


Link to post
Share on other sites

update on my ill-advised NameSearchInitialName idea. It's not such a good idea as it is hard to clear the variable. Doug's module, Roman's macros, or internal registers instead.........

Share this post


Link to post
Share on other sites

This is shaping up to be something of a game-changing thread in the XML world, IMHO. Doug's string --> memory module. Sweet. Wow. Extremely useful and it makes one wonder why MSFT didn't include such capability from the beginning, or at least from the time they added the gps module. I can't wait to try it out! Ditto Robbie's xml --> hard disk read/write module. There's a lot you can do when you are able to write to and read from file. I am having a lot of fun creating, saving and loading Flight Plans from within xml. Robbie will be releasing it soon - he is still polishing it and it will be my job to write the documentation. Bob

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
<Value>(A:ATC FLIGHT NUMBER,string) (>C:FSX_STRINGS:String00)</Value>
Hi, I haven't tried it yet, but should (A:ATC FLIGHT NUMBER,string) (>C:FSX_STRINGS:String00) just be a line of code in your Update section rather than inside a <Value> tag? And for FS9, Doug's dll module is copied to the modules folder and there should be no need for the <Launch.Addon> section......... I think / guess Hope this works. I am anxious to make use of it too. Bob

Share this post


Link to post
Share on other sites
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

Jan, It may not work in FS9. I haven't tried it myself. I don't have a reliable FS9 install any more, and the install disks are buried away in a box somewhere... Doug

Share this post


Link to post
Share on other sites

Thank-You!! Doug, PM sent.. To keep going on this topic, For XML only... ( tested in FS9) Spent most of the US labor day on this little brain teaser, just a theory I needed to prove before I lost it! ( Both mind and idea LOL! ) But I think I have found a nice set of Macros that will save 6 or less (automatic) char digits into 1 L:Var. They are very easy to use and flexible. Buy using multiple properly formatted Macro calls one could save "words" up to an unlimited amount of Chars. Kept going on this and made a FMC that does absolutely nothing (LOL!) except demonstrate some of the coding. ( Attached Code ) The "test" FMC works like any other. To turn on keyboard ( Turns green ) for input, left click on "keyboard" button. To clear scratchpad, right click on "keyboard" button. A "Reload Panels" button is provided on the lower right hand screw. For example purposes the FMC is coded to provide up to 18 chars per LSK. Just a note, if one would have made this using one L:Var per Char it would've taken 90 of them, in this it took only 15. The Macros use the upper registers ( 46 - 49 ) to stay "out of the way" and the display uses ( 1 - 9 ). If one was to uses similar coding like this in a true FMC with 6 LSKs on each side and the scratchpad one would have approx 33 left over to do other things. IE each page of FMC only uses 1-13, the strings are processed only when needed/displayed, it makes the display string much easier to deal with and saves processor/FPS. Syntax for the Macro "SaveString" ( 'Raw string', GPS string or l register ) @SaveString(n) ( L:Var to save to )Where (n) in the macro call is the section of 6 or less chars to be saved. Ex.'ABCDEFGHIJKL' @SaveString(1) = 706968.676665 = FED.CBA --> (L:Var#1)'ABCDEFGHIJKL' @SaveString(2) = 767574.737271 = LKJ.IHG --> (L:Var#2)Note - As you notice, the resulting output is reversed. This is done so when a null char is found, 00 replaces it and the value remains valid. EX. .000065 works but 65.0 would not if 'A' was the only char sent to the macro. I may have done this a different way using a downward counting pow, (650000.0 and a lot more code) but this works. To reduce overhead the macro stops processing once the string length is reached. Syntax for the Macro "RebuildString" ( L:Var, G:Var or Raw number ) @RebuildString ( Output, or Register to continue ) Ex. based on the above SaveString(L:Var#1) @RebuildString = 'ABCDEF' if only a 6 char word is used. For more than 6 then, (L:Var#2) @RebuildString = 'GHIJKL' sp1(L:Var#1) @RebuildString = 'ABCDEF' l1 (=GHIJKGL) scat s1 (=ABCDEFGHIJKL)Note - As you notice, when more than 1 6 digit word is processed it is done reversed. This is done because if it was done in a forward fashion 2 registers would have been needed. :-( The macro processes 2 digits at a time ( 2 are needed for a full char ) and stops processing when a value is less than 30, again for overhead savings. I know that 32 = (space)bar and that the lowest char (!) in charmap.exe = 0x21 = decimal 33. What #s 31 and 30 are, I have no idea, just left a little cushion is all. Notes for both - As you can see 2 and ONLY 2 digits per char can be used in these macros (decimal 30 - 99), this means NO special chars. If you follow the ASCII map up to small 'a' it will work. If one uses the ASCII input via <Keys> in FS, no problems will occour. Maybe someone can use this example,Just something to add to this topic. Roman The "useless" FMC :-)

<Gauge Name="STRING_STORE_TEST" Version="1.0"> <Element Name="BACKGROUND"><Rectangle Width="200" Height="175" FillColor="#b7b7b7" LineWidth="4" Color="#7f7f7f" Bright="Yes"/></Element><Element><Position X="0" Y="0"/><Circle Radius="4" FillColor="Black" Bright="Yes"/></Element><Element><Position X="193" Y="0"/><Circle Radius="4" FillColor="Black" Bright="Yes"/></Element><Element><Position X="0" Y="167"/><Circle Radius="4" FillColor="Black" Bright="Yes"/></Element><Element><Position X="193" Y="167"/><Circle Radius="4" FillColor="Black" Bright="Yes"/></Element><Element><Position X="34" Y="12"/><Rectangle Width="160" Height="140" FillColor="#010101" Bright="Yes"/></Element><Element><Position X="7" Y="20"/><Rectangle Width="20" Height="10" FillColor="#010101" LineWidth="2" Color="#7f7f7f" Bright="Yes"/></Element><Element><Position X="7" Y="50"/><Rectangle Width="20" Height="10" FillColor="#010101" LineWidth="2" Color="#7f7f7f" Bright="Yes"/></Element><Element><Position X="7" Y="80"/><Rectangle Width="20" Height="10" FillColor="#010101" LineWidth="2" Color="#7f7f7f" Bright="Yes"/></Element><Element><Position X="7" Y="110"/><Rectangle Width="20" Height="10" FillColor="#010101" LineWidth="2" Color="#7f7f7f" Bright="Yes"/></Element><Element><Position X="70" Y="155"/><Rectangle Width="85" Height="15" FillColor="#010101" LineWidth="2" Color="#7f7f7f" Bright="Yes"/></Element> <!-- ############################################################################### --> <!-- REGISTERS FOR SAVING STRING47 = The string to be converted48 = String Length49 = Temporary & Final To Save--> <Macro Name="SaveString">@1 1 - 6 * 6 ssub sp470 sp49l47 slen sp48:2112l47 l48 symb ord 1 + 0.000001 * l49 100 * + 0.000001 - s49l48 0 > if{ l48 -- sp48 g2112 }</Macro>  <!-- REGISTERS FOR REBUILDING STRING46 = Raw Value, Part 1 of 2 separated (reversed)47 = Raw Value, Part 2 of 2 separated (reversed)48 = Temp Value49 = Output--> <Macro Name="RebuildString">d int d sp47 r - 1000000 * int abs sp46'' sp49:2112l46 10 % sp48 l46 0.1 * int 10 % 10 * l48 + s48l49 l48 chr scat s49 l46 0.01 * int d s46 30 > if{ g2112 } els{ l47 s46 30 > if{ 0 sp47 g2112 } } l49</Macro> <!--STORAGE VARIABLES--><Macro Name="LSK1">L:Test_Store_1_@1, number</Macro><Macro Name="LSK2">L:Test_Store_2_@1, number</Macro><Macro Name="LSK3">L:Test_Store_3_@1, number</Macro><Macro Name="LSK4">L:Test_Store_4_@1, number</Macro><Macro Name="SCRATCHPAD">L:Test_Store_5_@1, number</Macro><Macro Name="KYBRD">L:Test_Store_6_@1, number</Macro> <Macro Name="CLEAR_SCRATCHPAD">0 (>@SCRATCHPAD(1)) 0 (>@SCRATCHPAD(2)) 0 (>@SCRATCHPAD(3))</Macro>  <!-- ############################################################################### --> <Update> <!-- As an example, when the gauge is first loaded some arbitrary strings are saved, just for kicks. -->(G:var1) 0 == if{ 1 (>G:Var1) 'ABCDEFGHIJKLMNOPQR' s1@SaveString(1) (>@LSK1(1))l1 @SaveString(2) (>@LSK1(2))l1 @SaveString(3) (>@LSK1(3)) '0123456789ZYXWVUTS' s2@SaveString(1) (>@LSK2(1))l2 @SaveString(2) (>@LSK2(2))l2 @SaveString(3) (>@LSK2(3)) 'THIS IS A TEST!' s3@SaveString(1) (>@LSK3(1))l3 @SaveString(2) (>@LSK3(2))l3 @SaveString(3) (>@LSK3(3)) 'I HOPE IT WORKS :)' s4@SaveString(1) (>@LSK4(1))l4 @SaveString(2) (>@LSK4(2))l4 @SaveString(3) (>@LSK4(3)) } <!-- Rebuild LSK1 -->(@LSK1(3)) @RebuildString sp1(@LSK1(2)) @RebuildString l1 scat s1(@LSK1(1)) @RebuildString l1 scat s1 <!-- Rebuild LSK2 -->(@LSK2(3)) @RebuildString sp2(@LSK2(2)) @RebuildString l2 scat s2(@LSK2(1)) @RebuildString l2 scat s2 <!-- Rebuild LSK3 -->(@LSK3(3)) @RebuildString sp3(@LSK3(2)) @RebuildString l3 scat s3(@LSK3(1)) @RebuildString l3 scat s3 <!-- Rebuild LSK4 -->(@LSK4(3)) @RebuildString sp4(@LSK4(2)) @RebuildString l4 scat s4(@LSK4(1)) @RebuildString l4 scat s4 <!-- Rebuild Line SCRATCHPAD -->(@SCRATCHPAD(3)) @RebuildString sp5(@SCRATCHPAD(2)) @RebuildString l5 scat s5(@SCRATCHPAD(1)) @RebuildString l5 scat s5 <!-- Add digits to line SCRATCHPAD from keyboard-->(L:CHR_DIGIT, number) 0 > if{(L:CHR_DIGIT, number) chr scat s5@SaveString(1) (>@SCRATCHPAD(1))l5 @SaveString(2) (>@SCRATCHPAD(2))l5 @SaveString(3) (>@SCRATCHPAD(3))0 (>L:CHR_DIGIT, number) } <!-- EX. The word "KEYBOARD" is stored into 2 L:vars then put back together to be displayed via L6 -->'KEYBOARD' @SaveString(1) (>@KYBRD(1))'KEYBOARD' @SaveString(2) (>@KYBRD(2)) (@KYBRD(2)) @RebuildString sp6(@KYBRD(1)) @RebuildString l6 scat s6 </Update> <!-- ############################################################################### --> <Element Name="DISPLAY"><Position X="42" Y="19"/><FormattedText X="150" Y="133" Font="Arial" FontSize="11" VerticalAdjust="Center" Color="Yellow" Bright="Yes" LineSpacing="15"><String>%\{tabs=2L}%(l1)%!s!%\n%\n%\{tabs=2L}%(l2)%!s!%\n%\n%\{tabs=2L}%(l3)%!s!%\n%\n%\{tabs=2L}%(l4)%!s!%\n%\n%\{tabs=2L}%(l5)%!s!%\n%\n</String></FormattedText></Element> <Element Name="KEYBOARD TEXT VIA L and L6 STORAGE"><Position X="70" Y="155"/><Text X="83" Y="18" Bright="Yes" Length="100" Color="%('Green' 'Red' (L:Keyboard_Active, bool) ?)" Font="Arial" FontSize="14" Adjust="Center" VerticalAdjust="Center" FontWeight="800"><String>%(l6)%!s!%</String></Text></Element> <!-- ############################################################################### --> <Mouse> <Area Name="LSK1" Left="7" Top="20" Width="20" Height="10"><Cursor Type="Hand"/><Click>(@SCRATCHPAD(1)) 0 > if{ (@SCRATCHPAD(1)) (>@LSK1(1)) (@SCRATCHPAD(2)) (>@LSK1(2)) (@SCRATCHPAD(3)) (>@LSK1(3)) @CLEAR_SCRATCHPAD } els{ (@LSK1(1)) (>@SCRATCHPAD(1)) (@LSK1(2)) (>@SCRATCHPAD(2)) (@LSK1(3)) (>@SCRATCHPAD(3)) 0 (>@LSK1(1)) 0 (>@LSK1(2)) 0 (>@LSK1(3)) }</Click></Area> <Area Name="LSK2" Left="7" Top="50" Width="20" Height="10"><Cursor Type="Hand"/><Click>(@SCRATCHPAD(1)) 0 > if{ (@SCRATCHPAD(1)) (>@LSK2(1)) (@SCRATCHPAD(2)) (>@LSK2(2)) (@SCRATCHPAD(3)) (>@LSK2(3)) @CLEAR_SCRATCHPAD } els{ (@LSK2(1)) (>@SCRATCHPAD(1)) (@LSK2(2)) (>@SCRATCHPAD(2)) (@LSK2(3)) (>@SCRATCHPAD(3)) 0 (>@LSK2(1)) 0 (>@LSK2(2)) 0 (>@LSK2(3)) }</Click></Area> <Area Name="LSK3" Left="7" Top="80" Width="20" Height="10"><Cursor Type="Hand"/><Click>(@SCRATCHPAD(1)) 0 > if{ (@SCRATCHPAD(1)) (>@LSK3(1)) (@SCRATCHPAD(2)) (>@LSK3(2)) (@SCRATCHPAD(3)) (>@LSK3(3)) @CLEAR_SCRATCHPAD } els{ (@LSK3(1)) (>@SCRATCHPAD(1)) (@LSK3(2)) (>@SCRATCHPAD(2)) (@LSK3(3)) (>@SCRATCHPAD(3)) 0 (>@LSK3(1)) 0 (>@LSK3(2)) 0 (>@LSK3(3)) }</Click></Area> <Area Name="LSK4" Left="7" Top="110" Width="20" Height="10"><Cursor Type="Hand"/><Click>(@SCRATCHPAD(1)) 0 > if{ (@SCRATCHPAD(1)) (>@LSK4(1)) (@SCRATCHPAD(2)) (>@LSK4(2)) (@SCRATCHPAD(3)) (>@LSK4(3)) @CLEAR_SCRATCHPAD } els{ (@LSK4(1)) (>@SCRATCHPAD(1)) (@LSK4(2)) (>@SCRATCHPAD(2)) (@LSK4(3)) (>@SCRATCHPAD(3)) 0 (>@LSK4(1)) 0 (>@LSK4(2)) 0 (>@LSK4(3)) }</Click></Area> <Area Name="KEYBOARD" Left="70" Top="155" Width="85" Height="15"><Cursor Type="Hand"/><Click Kind="LeftSingle+RightSingle">(M:Event) 'LeftSingle' scmp 0 == if{ (L:Keyboard_Active, bool) ! (>L:Keyboard_Active, bool) } els{ @CLEAR_SCRATCHPAD }</Click></Area> <Area Name="RELOAD" Left="187" Top="163" Width="11" Height="11"><Cursor Type="Hand"/><Click>(>K:RELOAD_PANELS)</Click></Area> </Mouse> <!-- ############################################################################### --> <Keys><On Key="Ascii"><Visible>(L:Keyboard_Active, bool)</Visible>(M:Key) (>L:CHR_DIGIT, number)</On></Keys>  </Gauge> [/Code]

The panel window entry used when String_Test.xml is placed into a folder named the same.

[Code][WindowXX]Background_color=1,1,1size_mm=400,350position=1visible=1ident=10001 gauge00=String_Test!String_Test, 4,4,400,350[/Code]

EDIT - CHANGES WHERE MADE TO THE @RebuildString MACRO DESCRIPTION.. THERE ARE ( as of now ) NO VALUES TO BE SENT ON A @RebuildString CALL.. oops.

Edited by spokes2112

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

With Doug, Bob, & Robbie & maybe me, throwing in ideas, projects, modules etc.. into the foray. I do believe a whole new era has arrived w/ XML.. More to come, guaranteed. I am the Walrus. LOL! Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Roman, Something to digest....!Of course it works, but only to save strings like the Keyboard and GVar section examples? Jan

Share this post


Link to post
Share on other sites

Roman, I like your macros and I always learn a lot from you. I see that you are working with the ascii decimal code – what you get from an M:Key or ord. Then you use numerical operators, multiplication and addition to construct an LVar moving the ord value to the right place when each new character is processed. Alternatively, have you considered working with the ascii binary instead of decimal? If you do that, then you could use the bit operators to shift the values (ie, 5 >> or 7 <<) with each new character processed. Wouldn’t a bit shift approach greatly simplify the code needed to construct the LVar? I am trying that way now – as always, at the suggestion and guidance of Robbie, but I am pretty much stuck at the moment because my xml capability isn’t quite up to the challenge. You, on the other hand, would be able to make it work I’m sure. And I agree with you. I think this thread is a pretty interesting glimpse into the future of xml capability. Bob

Share this post


Link to post
Share on other sites

If I can construct a macro name, should I be able to call it?Or am I fantasizing?

<Macro Name="M1">C:FSX_STRINGS:String222:1</Macro><Macro Name="M2">C:FSX_STRINGS:String222:2</Macro><Macro Name="M3">C:FSX_STRINGS:String222:3</Macro> <Mouse><Cursor Type="Hand"/> <Click>(L:Index, number) ++ (>L:Index, number)(L:Index, number) 3 >if{ 1 (>L:Index, number) }'M' (L:Index, number) 48 + chr scat s0'XXX XXXX' (>@l0) </Click></Mouse>

Share this post


Link to post
Share on other sites

The following is contributed by Robbie McElrath: An alternative approach to Roman’s very clever string storing macros, the macros in the attached sample gauge utilize bit operators to manipulate string information. Tested in FS9, but presume it will be fine in FSX too. Features (my interpretation of Robbie’s work):

  • Strings (bit information about strings) of up to 64 alphanumeric characters (including spaces) in length can be stored in a single, unitless L:Var. I need to check whether or not the macros can accommodate ascii characters "+", "-", ",", and "."
  • The LVar can have any name and there can be any number of such string LVars in a gauge. The string LVars can be read across multiple gauges, like normal LVars.
  • The macros in the attached sample gauge are set up for keyboard entry (line 15), but should be easy to modify for mouse & click entry if desired
  • The Backspace key is functional.
  • Clearing the LVars must be done using the @Clear macro (for example, line 206-207)
  • The xml code to create the LVar is simple, for example: @Read(L:StringLVar1) (reads the character entry and stores the info into L:StringLVar1 or whatever name you choose)
  • The code to display or pass a string is also simple:
  • <String>%(@ToString(L:StringLvar1))%!s!</String>, or
  • @ToString(L:StringLvar1) (>C:fs9gps:FlightPlanNewWaypointICAO)

Use of macros such as these or Roman’s provides a type of gauge solution to storing strings. To use the attached Test Gauge:

  1. Click on Text Box 1 to enable keyboard direct entry in that text box. Type in the ICAO of a Waypoint such as WK3KICTCF19R. Now, click the top olive colored button, WaypointIntersectionICAO Test. What happens is that the contents of the text box are stored into L:StringLVar1 as you type, and when the olive button is clicked, L:StringLVar1 is passed to (>C:fs9gps:FlightPlanNewWaypointICAO) (line 214), and then WaypointIntersectionICAO is displayed (line 151) next to Confirm.
  2. Click on Text Box 2 to enable keyboard entry in that text box. Enter any valid ICAO and then click the yellow-green button. That fires off a DTO (lines 222-223) to the ICAO you just typed. Now check your flight plan or map to see the result.
  3. Click the red R button in the upper right to clear values.

<Gauge Name="StoreString1" Version="1.0"><Size X="250" Y="150" />     <Macro Name="Read4">      (@1_4, number) 7 << 0xFFFFFFF & (@1_3, number) 21 >> 0x7F & | (>@1_4, number)      (@1_3, number) 7 << 0xFFFFFFF & (@1_2, number) 21 >> 0x7F & | (>@1_3, number)      (@1_2, number) 7 << 0xFFFFFFF & (@1_1, number) 21 >> 0x7F & | (>@1_2, number)      (@1_1, number) 7 << 0xFFFFFFF & (@2, number)   @3	0x7F & | (>@1_1, number)    </Macro>     <Macro Name="Read">      @Read4(@1_4, @1_3_4, 21 >>)      @Read4(@1_3, @1_2_4, 21 >>)      @Read4(@1_2, @1_1_4, 21 >>)      @Read4(@1_1, M:Key)    </Macro>     <Macro Name="Backspace4">      (@1_1, number) 7 >> (@1_2, number) 0x7F & 21 << | (>@1_1, number)      (@1_2, number) 7 >> (@1_3, number) 0x7F & 21 << | (>@1_2, number)      (@1_3, number) 7 >> (@1_4, number) 0x7F & 21 << | (>@1_3, number)      (@1_4, number) 7 >> (@2_1, number) 0x7F & 21 << | (>@1_4, number)    </Macro>     <Macro Name="Backspace">      @Backspace4(@1_1, @1_2)      @Backspace4(@1_2, @1_3)      @Backspace4(@1_3, @1_4)      @Backspace4(@1_4, L:PleaseBeZero)    </Macro>     <Macro Name="Clear4">      0 (>@1_1, number)      0 (>@1_2, number)      0 (>@1_3, number)      0 (>@1_4, number)    </Macro>     <Macro Name="Clear">      @Clear4(@1_1)      @Clear4(@1_2)      @Clear4(@1_3)      @Clear4(@1_4)    </Macro>     <Macro Name="ToString1">      (@1, number) 21 >> 0x7F & chr      (@1, number) 14 >> 0x7F & chr scat      (@1, number)  7 >> 0x7F & chr scat      (@1, number)   	0x7F & chr scat    </Macro>     <Macro Name="ToString4">      @ToString1(@1_4) @ToString1(@1_3) @ToString1(@1_2) @ToString1(@1_1) scat scat scat    </Macro>     <Macro Name="ToString">      @ToString4(@1_4) @ToString4(@1_3) @ToString4(@1_2) @ToString4(@1_1) scat scat scat    </Macro>     <Update>                 </Update>     <Element Name="BACKGROUND RECTANGLE">            <Position X="0" Y="0"/>        <Rectangle Width="250" Height="150" FillColor="gainsboro" Bright="Yes" />                </Element>         <Element Name="RELOAD GAUGES - Rectangle and 'R' ">        <Element Name="Background">                <Position X="230" Y="5"/>            <Rectangle Width="15" Height="15" FillColor="crimson" Bright="Yes"/>                    </Element>        <Element Name="R">                    <Position X="233" Y="6"/>                <FormattedText X="10" Y="20" Adjust="left" Font="Arial Bold" FontSize="12" Color="white" Bright="Yes">                    <String>R</String>                </FormattedText>                </Element>    </Element>         <Element Name="BUTTONS and TEXT BOXES">        <Element Name="OLIVE CLICK BUTTON">                <Position X="5" Y="5"/>                    <Rectangle Width="15" Height="15" FillColor="olive" Bright="Yes"/>                    </Element>            <Element Name="YELLOW GREEN CLICK BUTTON">                <Position X="5" Y="30"/>                    <Rectangle Width="15" Height="15" FillColor="yellowgreen" Bright="Yes"/>                    </Element>            <Element Name="GREEN CLICK BUTTON">                <Position X="5" Y="55"/>                    <Rectangle Width="15" Height="15" FillColor="green" Bright="Yes"/>                    </Element>            <Element Name="ENTRY BOX 1">                <Position X="5" Y="90"/>                    <Rectangle Width="190" Height="15" FillColor="white" Bright="Yes"/>                    </Element>                <Element Name="OUTLINE - ENTRY BOX 1">            <Visible>(L:KeyboardEntryEnabled1, bool)</Visible>            <Position X="5" Y="90"/>                    <Rectangle Width="190" Height="15" Color="gray" Bright="Yes"/>                    </Element>            <Element Name="ENTRY BOX 2">                <Position X="5" Y="130"/>                    <Rectangle Width="190" Height="15" FillColor="white" Bright="Yes"/>                    </Element>                <Element Name="OUTLINE - ENTRY BOX 2">            <Visible>(L:KeyboardEntryEnabled2, bool)</Visible>            <Position X="5" Y="130"/>                    <Rectangle Width="190" Height="15" Color="gray" Bright="Yes"/>                    </Element>            </Element>         <Element Name="READ BACK">            <Element Name="Button 1 Number of Clicks">                <Position X="25" Y="5" />                                    <FormattedText X="20" Y="20"  Adjust="left" Fixed="Yes" Font="courier new" Color="#101010" Bright="Yes" LineSpacing="13" FontSize="10">                        <String>%((L:Button1Clicks, enum))%!d!%</String>                            </FormattedText>        </Element>            <Element Name="Button 2 Number of Clicks">                <Position X="25" Y="30" />                                    <FormattedText X="20" Y="20"  Adjust="left" Fixed="Yes" Font="courier new" Color="#101010" Bright="Yes" LineSpacing="13" FontSize="10">                        <String>%((L:Button2Clicks, enum))%!d!%</String>                            </FormattedText>        </Element>            <Element Name="Button 3 Number of Clicks">                <Position X="25" Y="55" />                                    <FormattedText X="20" Y="20"  Adjust="left" Fixed="Yes" Font="courier new" Color="#101010" Bright="Yes" LineSpacing="13" FontSize="10">                        <String>%((L:Button3Clicks, enum))%!d!%</String>                            </FormattedText>        </Element>            <Element Name="ROBBIE MACRO LVAR1 to STRING1">                <Position X="7" Y="91"/>            <FormattedText X="150" Y="20"  Adjust="left" Fixed="Yes" Font="courier new" Color="red" Bright="Yes" FontSize="10">                            <String>%(@ToString(L:StringLVar1))%!s!</String>            </FormattedText>        </Element>            <Element Name="ROBBIE MACRO LVAR2 to STRING2">                <Position X="7" Y="131"/>            <FormattedText X="150" Y="20"  Adjust="left" Fixed="Yes" Font="courier new" Color="blue" Bright="Yes" FontSize="10">                            <String>%(@ToString(L:StringLVar2))%!s!</String>            </FormattedText>        </Element>                    <Element Name="Confirm L:StringLVar1">                <Position X="47" Y="78"/>            <FormattedText X="150" Y="20"  Adjust="left" Fixed="Yes" Font="courier new" Color="red" Bright="Yes" FontSize="10">                            <String>%((C:fs9gps:WaypointIntersectionICAO))%!s!</String>            </FormattedText>        </Element>            </Element>             <Element Name="CAPTIONS">            <Element Name="WP Test">                <Position X="40" Y="5"/>            <FormattedText X="150" Y="30" Font="Courier New" FontSize="10" LineSpacing="13" Color="#101010" Bright="Yes" >                <String>WaypointIntersectionICAO Test</String>            </FormattedText>        </Element>            <Element Name="GTO Test">                <Position X="40" Y="30"/>            <FormattedText X="60" Y="30" Font="Courier New" FontSize="10" LineSpacing="13" Color="#101010" Bright="Yes" >                <String>GTO Test</String>            </FormattedText>        </Element>            <Element Name="Button 3">                <Position X="40" Y="55"/>            <FormattedText X="60" Y="30" Font="Courier New" FontSize="10" LineSpacing="13" Color="gray" Bright="Yes" >                <String>Button 3</String>            </FormattedText>        </Element>        <Element Name="Confirm">                <Position X="7" Y="78"/>            <FormattedText X="60" Y="20" Font="Courier New" FontSize="10" LineSpacing="13" Color="#101010" Bright="Yes" >                <String>Confirm:</String>            </FormattedText>        </Element>        <Element Name="Text Box 1">                <Position X="144" Y="78"/>            <FormattedText X="60" Y="20" Font="Courier New" FontSize="10" LineSpacing="13" Color="#101010" Bright="Yes" >                <String>Text Box 1</String>            </FormattedText>        </Element>        <Element Name="Text Box 2">                <Position X="144" Y="118"/>            <FormattedText X="60" Y="20" Font="Courier New" FontSize="10" LineSpacing="13" Color="#101010" Bright="Yes" >                <String>Text Box 2</String>            </FormattedText>        </Element>            </Element>            <Mouse>                    <!-- RELOAD GAUGE AND CLEAR VALUES -->            <Area Left="230" Top="5" Width="15" Height="15">                <Cursor Type="Hand"/>                <Click>                    (>K:RELOAD_PANELS)                    0 (>L:Button1Clicks, enum)                    0 (>L:Button2Clicks, enum)                    0 (>L:Button3Clicks, enum)                    0 (>L:KeyboardEntryEnabled1, bool)                    0 (>L:KeyboardEntryEnabled2, bool)                    @Clear(L:StringLVar1)                    @Clear(L:StringLVar2)                </Click>            </Area>            <!-- Button 1 -->                            <Area Left="5" Top="5" Width="15" Height="15">                <Cursor Type="Hand" />                    <Click>                        @ToString(L:StringLVar1) (>C:fs9gps:WaypointIntersectionICAO)                        (L:Button1Clicks, enum) ++ (>L:Button1Clicks, enum)                    </Click>            </Area>            <!-- Button 2 -->                            <Area Left="5" Top="30" Width="15" Height="15">                <Cursor Type="Hand" />                    <Click>                        @ToString(L:StringLVar2) (>C:fs9gps:FlightPlanNewWaypointICAO)                        (>C:fs9gps:FlightPlanDirectToDestination)                        (L:Button2Clicks, enum) ++ (>L:Button2Clicks, enum)                    </Click>            </Area>            <!-- Button 3 -->                            <Area Left="5" Top="55" Width="15" Height="15">                <Cursor Type="Hand" />                    <Click>                         (L:Button3Clicks, enum) ++ (>L:Button3Clicks, enum)                    </Click>            </Area>                <!-- Text Box 1 ENABLE KEYBOARD DIRECT ENTRY-->                            <Area Left="5" Top="90" Width="190" Height="15">                <Cursor Type="Hand" />                    <Click>                        (L:KeyboardEntryEnabled1, bool) ! (>L:KeyboardEntryEnabled1, bool)                        0 (>L:KeyboardEntryEnabled2, bool)                        </Click>            </Area>            <!-- Text Box 2 ENABLE KEYBOARD DIRECT ENTRY-->                            <Area Left="5" Top="130" Width="190" Height="15">                <Cursor Type="Hand" />                    <Click>                        (L:KeyboardEntryEnabled2, bool) ! (>L:KeyboardEntryEnabled2, bool)                        0 (>L:KeyboardEntryEnabled1, bool)                                        </Click>            </Area>                </Mouse>            <Keys>        <On Key="AlphaNumeric"> <!-- TEXT ENTRY BOX 1-->            <Visible>(L:KeyboardEntryEnabled1, bool)</Visible>            @Read(L:StringLVar1)        </On>        <On Key="Backspace"> <!-- Backspace Macro 1-->            <Visible>(L:KeyboardEntryEnabled1, bool)</Visible>            @Backspace(L:StringLVar1)        </On>                <On Key="AlphaNumeric"> <!-- TEXT ENTRY BOX 2-->            <Visible>(L:KeyboardEntryEnabled2, bool)</Visible>            @Read(L:StringLVar2)        </On>        <On Key="Backspace"> <!-- Backspace Macro 2-->            <Visible>(L:KeyboardEntryEnabled2, bool)</Visible>            @Backspace(L:StringLVar2)        </On>    </Keys> </Gauge>

We would sincerely appreciate feedback and notification of any unintended side effects. Thanks. Enjoy. Bob

Share this post


Link to post
Share on other sites

Hi, Installed the gauge and it works as promised.No side effects.Only the 10 entry's.... Jan

Share this post


Link to post
Share on other sites

Hi, Jan, Yes. A lot of macros, but I don't think he spent much time on them and I do not believe he has ever installed Flight Simulator. I like Robbie's or Roman's macros better than the inelegant way I had been storing strings with dozens of single character L:Var chr scat's all over my code, but I would rather have simplicity, like an "S:Var". In my opinion, Doug may have the right approach to have a module handle the strings. I only play around in FS9 ... did you get Doug's latest prototype to work in FS9? I need to get back to trying out his module today. Bob

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...