Jump to content
Sign in to follow this  
taguilo

some string help ?? plz

Recommended Posts

Guest ridgell

%((L:win2, enum))%!01d!i would like to make the string above blink.it is a series of single letter windows, corrisponding to key board entry. the window that is "in sequence" i would like to blink useing for example (G:Var1) 3 < (the Gvar being the timer) so i need a conditional string; if G:Var1 is less then 3 show the (L:win2,enum) value 'els' show nothing 'blank' how is that written?

Share this post


Link to post
Share on other sites

Hi,If you use FormattedText, you can use {blnk}, see gps.Also you can do something with:%((Your Var) (P:absolute time, number) 1 % 0.5 > *)%{if}%((L:win2, enum))%!01d!Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest ridgell

thanks Jan! that was close; i guess i needed to more careful what i ask for...i used your snippet to get;%((L:sequence,emum) 0 == (G:Var1) 5 < &&)%{if}%((L:win1, enum))%!01d!what i failed to explain, is that i want it to stop blinking when it is out of sequence.there are seven numbers in the display. (lat or lon coords d,m,s) when you select to input co-ordinates you type your number on the gauge number pad. the display starts at the left, and moves one spot right with each key press. (L:sequence,enum) tracks the place. i want the position that is 'in sequence' to blink then stop blinking as the sequence moves to the next number right.i need the (L:win1,enum) value on the other side of an 'els' statement. hmmm when the number is in sequence it will always be a '0' so the blinking is a zero blinking that stops blinking when a value is entered (L:win1,enum) and the '0' to the right starts blinking. you code blinks like a champ by the way! i am still scrathing my head with formated text...from when you tried to school me on string huds.though the color case thing is cool, i have used that a bunch but it never occured to me for this until i read your post.

Share this post


Link to post
Share on other sites

Hi Ridgell,Are you using one LVar for each digit to display, or a single Lvar that contains the whole coordinate number, updated every time a key is pressed?. The solution is simple but different in both cases.Tom

Share this post


Link to post
Share on other sites
Guest ridgell

each number has its own lvar, win1- win7there is also a single that contains the whole number.but in the display i am useing 7 lvars of a single digit each.please show both methods, i alway get more form your examples then just a direct answer.

Share this post


Link to post
Share on other sites

Actually I, like you, used one LVar for each position with another Lvar as container. However I think it is simpler to use only one Lvar for the whole number BUT the last digit, that needs to blink.So, facing on this way, the pseudocode would be something like:@BlinkerCode%((LVarComplete))%!6d!{blnk}0{nr}And the macros: (P:Absolute Time,seconds)@Time 1 % 0.5 >LVarComplete should hold the coordinate value without the last digit, which is a "0" blinking.You must update that LVar on each keypress. If using individual LVars, it is basically the same, but a bit complex. I for one used a set of vars that shift their values for each keypress, so for example lvar1 takes the value of lvar2, lvar2 of lvar3 and so on. Making it simpler, should result in something like:%(@Var(Lvar))%!s!%(@Var(LVar2))%!s!...to LVar7{blnk}0{nr}I think the first example is clearly better.Hope this helps,Tom

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