Archived

This topic is now archived and is closed to further replies.

Guest rpmc

Click Repeat

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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.

Share this post


Link to post
Share on other sites

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

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

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