Jump to content
Sign in to follow this  
Guest rpmc

Click Repeat

Recommended Posts

Guest rpmc

Is it possible to code Click Repeat to increment a variable 500 units but have single Click increment the variable by only 100 units? (FS9)Thanks also posted on aerodynamika.com, Panel Design Questions

Share this post


Link to post
Share on other sites

Hi,Maybe you can try using the left mouseknob for click repeat 500 + (>L:...) etc. and the rightmouseknob for single click 100 (>L:...) etc.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

You could also try, (M:Event) 'LeftSingle' scmp ! if{ (G:Var1) ++ (>G:Var1) (G:Var1) 1 == if{ (P:ABSOLUTE TIME,seconds) (>G:Var2) } (P:ABSOLUTE TIME,seconds) (G:Var2) 0 < if{ (Your L:var,number) 100 + (>Your L:var,number) } els{ (Your L:var,number) 500 + (>Your L:var,number) } } (M:Event) 'LeftRelease' scmp ! if{ 0 (>G:Var1) } Hold down left click for rapid 500s inc. Left click for single 100s inc. Change + to - for dec.


Paul EGLD

Share this post


Link to post
Share on other sites
Guest rpmc

Thanks, Jan, Thanks pve,if I understand the second example correctly, if the mouse button is held down long enough, which I gather is more than one update cycle(?), then the 500 increment is applied... clever. I'll have to work with it, but I guess this could be 'expandable' ... single click - 100, hold down - 500, hold down more than, say, a few seconds - 1000 ??Many Thanks, Bob

Share this post


Link to post
Share on other sites

Keep in mind that many of the stock key_events already have an "auto-acceleration" feature built in, e.g., altitude, v/s, etc.However, coding a timer-based command accelerator for custom events is a very worthwhile task... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest rpmc

>Keep in mind that many of the stock key_events already have>an "auto-acceleration" feature built in, e.g., altitude, v/s,>etc.Tx for the info on key_events. In my case, I am incrementing L vars. PVE and Tom's code (aerodynamica.com) are nice, clever examples. If there's a bag of tricks collection, this should go in the Mouse section. So far, I haven't found this particular situation/mouse function addressed before in tuts or the forums.Rgds

Share this post


Link to post
Share on other sites
Guest rpmc

Thanks, Jan,I searched, but I can now see I wasn't very thorough. Thank you for pointing me to this. Roman's code is what I was looking for.And thank you to you, pve and Tom for assistance.Regards,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...