March 24, 200719 yr Hi all Need one CLR button to do usual single click command and also hold down for 2 seconds to do another Master CLR. Single click 0 (>L:MsgWarn,number)0 (>L:APT_ICAO_enter,bool)0 (>L:Delete,bool)0 (>L:DirTO_cont,bool) 0 (>L:DirTO,bool) 0 (>L:SetValue, number)0 (>L:InputError, number)@DigitErase@InvokeICAOInputMode((@c:FacilityICAO), ' ', 31) I have the click code for the delay (thanks Tom) (M:Event) 'LeftSingle' scmp 0 == if{ (L:Var1,seconds) 0 == if{ @Time (>L:Var1,seconds) 0 (>L:Clear,bool) }els{ (L:Var1,seconds) 2 + @Time < if{ 1 (>L:Clear,bool) } }} How do I combine the two click commands. Paul EGLD
March 24, 200719 yr Hi,Not sure what you need, but may be something like this (not tested):(M:Event) 'LeftSingle' scmp 0 == if{ 0 (>L:MsgWarn,number) 0 (>L:APT_ICAO_enter,bool) ... etc.(P:absolute time,seconds) 2 + (>L:Var1,seconds) } (M:Event) 'Leave' scmp 0 == if{ (P:absolute time,seconds) (L:Var1,seconds) > if{ 0 (>L:MsgWarn,number) 0 (>L:APT_ICAO_enter,bool) ... etc. } } ???Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 24, 200719 yr Paul,Try this:(M:Event) 'LeftSingle' scmp 0 == if{ (L:Var1,seconds) 0 == if{ @Time (>L:Var1,seconds) 0 (>L:MsgWarn,number)0 (>L:APT_ICAO_enter,bool)0 (>L:Delete,bool)0 (>L:DirTO_cont,bool) 0 (>L:DirTO,bool) 0 (>L:SetValue, number)0 (>L:InputError, number)@DigitErase@InvokeICAOInputMode((@c:FacilityICAO), ' ', 31)0 (>L:Clear,bool)}els{ (L:Var1,seconds) 2 + @Time < if{ 1 (>L:Clear,bool) } }} All the zero assignments, @DigitErase and @InvokeICAOInputMode will be processed on the first pass only.I'm not sure whether this would suit for @InvokeICAOInputMode Tom
March 24, 200719 yr Author Hi guys This what I got (M:Event) 'LeftSingle' scmp 0 == if{ 0 (>L:MsgWarn,number) 0 (>L:APT_ICAO_enter,bool) 0 (>L:Delete,bool) 0 (>L:DirTO_cont,bool) 0 (>L:DirTO,bool) 0 (>L:SetValue, number) 0 (>L:InputError, number)@DigitErase @InvokeICAOInputMode((@c:FacilityICAO), ' ', 31) }(P:absolute time,seconds) 4 + (>L:MSG,seconds) > (M:Event) 'Leave' scmp 0 == if{ (P:absolute time,seconds) (L:MSG,seconds) if{ 1 (>L:MasterMsgWarn,bool) } } This one resets top multiple values and L:MasterMsgWarn,bool with single click, It resets multiple values with hold down and L:MasterMsgWarn,bool on release. I am trying to reset multiple values with single click (less than 2 secs) and L:MasterMsgWarn,bool with hold after 2 secs. Nearly there Toms code resets both on single click Paul EGLD
March 24, 200719 yr Hi,Small correction: (M:Event) 'LeftSingle' scmp 0 == if{ 0 (>L:MsgWarn,number) 0 (>L:APT_ICAO_enter,bool) 0 (>L:Delete,bool) 0 (>L:DirTO_cont,bool) 0 (>L:DirTO,bool) 0 (>L:SetValue, number) 0 (>L:InputError, number)@DigitErase @InvokeICAOInputMode((@c:FacilityICAO), ' ', 31) (P:absolute time,seconds) 4 + (>L:MSG,seconds) } (M:Event) 'Leave' scmp 0 == if{ (P:absolute time,seconds) (L:MSG,seconds) > if{ 1 (>L:MasterMsgWarn,bool) } } Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 24, 200719 yr Paul,It's basically the same...(M:Event) 'LeftSingle' scmp 0 == if{ (L:MSG,seconds) 0 == if{ @Time (>L:Var1,seconds) 0 (>L:MsgWarn,number) 0 (>L:APT_ICAO_enter,bool) 0 (>L:Delete,bool) 0 (>L:DirTO_cont,bool) 0 (>L:DirTO,bool) 0 (>L:SetValue, number) 0 (>L:InputError, number) @DigitErase @InvokeICAOInputMode((@c:FacilityICAO), ' ', 31) } els{ (L:MSG,seconds) 2 + @Time < if{ 0 (>L:MasterMsgWarn,bool) } } }(M:Event) 'LeftSingle' scmp 0 == if{ 0 (>L:MSG,seconds) } This code resets a bunch of values only once, and, after being held for more than 2 seconds, resets (L:MasterMsgWarn,bool) as well (or it should be set to 1?).Note that if hold is released before two seconds, MasterMsgWarn will NOT reset.Tom
March 24, 200719 yr Author Tom, Jan I got them both working now, I changed Jans to LeftRelease. I expected the long hold to change without release but now I understand. Thanks to you both. Paul Paul EGLD
Create an account or sign in to comment