October 15, 200817 yr 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
October 15, 200817 yr 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..." Jan "Beatus ille qui procul negotiis..."
October 15, 200817 yr 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
October 15, 200817 yr 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
October 15, 200817 yr Moderator 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
October 16, 200817 yr >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
October 16, 200817 yr Hi,Some useful info from Roman:http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchJan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
October 16, 200817 yr 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
Create an account or sign in to comment