Jump to content
Sign in to follow this  
pve

Loop command fs9 XML

Recommended Posts

Hi all Is it possible to loop a list of Vars. Scroll Y Loop %((Var1) (Var2) etc. )%!d% Etc.


Paul EGLD

Share this post


Link to post
Share on other sites

Hi,For Eicas warnings, advisory's etc. I use .Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

I am trying to get a list values out of a macro or group of vars. to show in a scrollable list. (L:Scroll,number) %( 10 s2 0 !=) %{if} %(0 sp1) %{loop} %(l1 (>MacroWithListofValues or numbers)) %((L:Values,number))%!d! %((L:,%(l1 ++ s1 l2 <) etc. Not sure how they do it with the gps ie. (>@c:FlightPlanWaypointIndex). Can a macro hold a list of values or numbers. I need to be able to scroll it.


Paul EGLD

Share this post


Link to post
Share on other sites

Paul, I still don't get you very well on what you want to do, and what means to you "a list of values or numbers", but I guess what you need is to print the value of each var in a single line, one beside the other, and then scroll the entire line?Something like this, maybe?%(0 sp1) // s1-l1 is the index %{loop}%( @ArrayOfValues ) // Is an array that retrieves the proper var according to l1 index passed and put in , ie, s3%(l3)%!d! // l3 is the value returned by the array%(l1 ++ s1 l2 < )%{next}Tom

Share this post


Link to post
Share on other sites

Hi Tom Yes that's it, Not sure how to setup the @arrayOfValues macro. Paul


Paul EGLD

Share this post


Link to post
Share on other sites

You could use an approach similar to this:l1 @1 == if{ (L:MyVar:@1,unit) sp3 }@AInd(0) @AInd(1) @AInd(2) @AInd(3) ... @AInd(n) ....%(0 sp1) // s1-l1 is the index %{loop}%( @Array ) %(l3)%!d! // l3 is the value returned by the array%(l1 ++ s1 l2 < )%{next}You may use the : after the name of each Lvar like:(L:MyVar:0,unit)(L:MyVar:1,unit)etcor this method directly:(L:MyVar0,unit)(L:MyVar1,unit)in this case the macro expression is (L:MyVar@1,unit)Should work fine for a limited number of array members (10-20)Tom

Share this post


Link to post
Share on other sites

Tom Thanks, Up to 20 vars will work OK. I will try both solutions. Paul


Paul EGLD

Share this post


Link to post
Share on other sites

Hi Tom Back on this now. Got it all working OK but I need to keep all the array values to use again later after loading. How can I do this? Paul


Paul EGLD

Share this post


Link to post
Share on other sites

Tom Using this:- (L:Display,number) @1 == if{ @WPtNameSend@1 } puts macros value into array @AInd(0) @AInd(1) @AInd(2) @AInd(3) @AInd(4) @AInd(5) @AInd(6) @AInd(7) Then need to store value in each array macro and retrieve in order (1 to n) when needed.Can it be done? Paul


Paul EGLD

Share this post


Link to post
Share on other sites

Something like this?(value) (>L:MyArray:@1,unit)@Assign(1) @Assign(2) @Assign(3) etc Many things can be done with these pseudoarrays; if you need a selectable condition for each array member, the best option is to use a "goto" operator within a script, like(start value) s0:0(Evaluate the macro) (l0 ++ s0 (bound) <= if{ g0 }etcTom

Share this post


Link to post
Share on other sites

Hi Tom Thanks for that, I give it a try. Paul


Paul EGLD

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...