Jump to content
Sign in to follow this  
pve

Multiple click commands link

Recommended Posts

Hi all (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == & if{ 0 (>L:FMCPage,enum) 0 (>L:FMCPage_Sub,enum) }(L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == & if{ 2 (>L:FMCPage,enum) 1 (>L:FMCPage_Sub,enum) } If I click this to get page 0 0 from page 1 1 it fires the next line 0 0 and I end up at page 2 1 Is there another way?


Paul EGLD

Share this post


Link to post
Share on other sites

Hi,You can try with if(...) and else(...)Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Paul,You might try this simple approach:(L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == and if{ 0 sp0 0 sp1 }(L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == and if{ 2 sp0 1 sp1 }l0 (>L:FMCPage,enum) l1 (>L:FMCPage_Sub,enum) Tom

Share this post


Link to post
Share on other sites

Hello Tom It does not jump across pages anymore, but the click now works on other pages not Defined in this code and all return page 0 0. Full code for this button (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 0 == & if{ 0 sp0 0 sp1 } (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == & if{ 0 sp0 0 sp1 } (L:FMCPage,enum) 3 == (L:FMCPage_Sub,enum) 1 == & if{ 3 sp0 0 sp1 } (L:FMCPage,enum) 5 == (L:FMCPage_Sub,enum) 0 == & if{ 0 sp0 0 sp1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 0 == & if{ 2 sp0 1 sp1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 2 == & if{ 2 sp0 1 sp1 } (L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == & if{ 2 sp0 1 sp1 } l0 (>L:FMCPage,enum) l1 (>L:FMCPage_Sub,enum) Paul


Paul EGLD

Share this post


Link to post
Share on other sites

Paul,Can you explain why you want everything in one ?And what are you trying to achieve?Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan This is FMC LSK 6 button, It only changes one page at a time but from many pages. Paul


Paul EGLD

Share this post


Link to post
Share on other sites

I see,Did you try && instead of & ?Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan Yes I tried that, If I take out all the code except the last line L:FMC_Page,enum) l1 (>L:FMC_PLN_Sub,enum) it still gives 0 0! Is Sp effective throughout the complete gauge or just the element or the line? Paul


Paul EGLD

Share this post


Link to post
Share on other sites

Paul,s0 and l0 is often tricky business.Try something like:(L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 0 == and if{ 0 s0 0 s1 } (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == and if{ 0 s0 0 s1 } (L:FMCPage,enum) 3 == (L:FMCPage_Sub,enum) 1 == and if{ 3 s0 0 s1 } (L:FMCPage,enum) 5 == (L:FMCPage_Sub,enum) 0 == and if{ 0 s0 0 s1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 0 == and if{ 2 s0 1 s1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 2 == and if{ 2 s0 1 s1 } (L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == and if{ 2 s0 1 s1 } s0 (>L:FMCPage,enum) s1 (>L:FMCPage_Sub,enum)or(L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 0 == and if{ 0 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == and if{ 0 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 3 == (L:FMCPage_Sub,enum) 1 == and if{ 3 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 5 == (L:FMCPage_Sub,enum) 0 == and if{ 0 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 0 == and if{ 2 (>L:value 1,enum) 1 (>L:value 2,enum) } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 2 == and if{ 2 (>L:value 1,enum) 1 (>L:value 2,enum) } (L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == and if{ 2 (>L:value 1,enum) 1 (>L:value 2,enum) } (L:value 1,enum) (>L:FMCPage,enum) (L:value 2,enum) (>L:FMCPage_Sub,enum)Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan/Tom Both solutions worked OK to get rid of the pages skiping problem. There remains a problem with the page number still stored will show a page that you don't want if you press again. I am working on that and think I have a way. Thanks for your help. paul


Paul EGLD

Share this post


Link to post
Share on other sites

Paul,Glad to know you figured out the solution.Now, some "tutorialing" :-)> l0 (>L:FMC_Page,enum) l1 (>L:FMC_PLN_Sub,enum)> >> it still gives 0 0! And will give 0 0 forever, because within the , registers are reset to 0, so as there is no value saved in s0 and s1, l0 and l1 default to 0. >Is Sp effective throughout the complete gauge or just the element >or the line?It's a bit more complex than that. They are direct linked to the stack's current visibility. Some gauge structures share a common stack (, ) where others, like events (,etc) limit the stack to their own space.Registers are great to use in terms of code efficiency and runtime speed, but as Jan stated, may be rather confusing if you don't have a strong understanding of the different ways they can be managed inside a gauge.Tom

Share this post


Link to post
Share on other sites

Tom Thanks for the lesson, I got round the problem by giving the click back to its own page number to stop the last stored number being used. ie. (L:FMC_Page,enum) 3 == (L:FMC_PLN_Sub,enum) 0 == & if{ 3 s0 0 s1 } gives a dead button. 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...