August 4, 200619 yr Hello again Gurus, can anyone help me how to create a Press and Hold Button that my condition only appears after i remaing clicking that buttin and holding for 2 seconds?
August 4, 200619 yr Gustavo,Some extra info would be great. For instance, does the condition need to remain active after releasing the button passing the 2 seconds, or it should reset (dissapear)? Do you know how to deal with events, (M:Event) structures, etc in XML code?Tom
August 4, 200619 yr >Hello again Gurus, can anyone help me how to create a Press>and Hold Button that my condition only appears after i remaing>clicking that buttin and holding for 2 seconds?Ummm you want us to write it for you? What have you tried? Where are you stuck? Please at least attempt to do it and then ask a specific question.A good example of push button code can be found in the Baron's gauge .cab file.
August 4, 200619 yr Hello Guys, thanks for the answer.I first, yes I Do know how to work with click events, let me try to be more clear about my doubt. I making a brand new freeware Aspen AT300 gauge in XML code. I
August 4, 200619 yr Gustavo,Ok, you can use this kind of approach:Put this at the beginning of the gauge, before any : (P:Absoulte time,seconds)in ,,(M:Event) 'LeftSingle' scmp 0 == if{ (L:Var1,seconds) 0 == if{ @Time (>L:Var1,seconds) 0 (>L:YOURVARDIMM,bool) } els{ (L:Var1,seconds) 2 + @Time < if{ 1 (>L:YOURVARDIMM,bool) } } } (M:Event) 'LeftRelease' scmp 0 ==if{ 0 (>L:Var1,seconds) 0 (>L:YOURVARDIMM,bool) }In this example, (L:YOURVARDIMM,bool) var will control the dimming status (0=off/1=on).If you need the dimming to remain ON when releasing the button AFTER a 2 seconds continious push, then remove the 0 (>L:YOURVARDIMM,bool) code within the 'LeftRelease' structure.You'll have to figure out how to insert the code for the other two pages in the snippet above :-) Hope this makes sense to you.TomPS: Please check for proper closing structures and replace "<" symbols with "& lt;" (without spaces) . Code is not tested.
August 4, 200619 yr Hi,Something similar is to find in the Message Button of the MS GPS.Look at the macros, update and click section.25(@g:messagesOff) ! (>@g:messagesOff)(@g:messagePopup) @kOff == if{ @kOn (>@g:messagePopup) 1 (>@c:NewMessagesConfirm) } els{ @kOff (>@g:messagePopup) }(@g:msgButtonDown) 0 != if{ (@g:msgButtonCount) ++ d (>@g:msgButtonCount) @MSGButtonDelay == if{ @MSGToggle } }(M:Event) 'LeftSingle' scmp 0 == if{ (@g:msgButtonDown) 0 == if{ 1 (>@g:msgButtonDown) 0 (>@g:msgButtonCount) } }(M:Event) 'Leave' scmp 0 == if{ (@g:msgButtonDown) 1 == if{ 0 (>@g:msgButtonDown) (@g:msgButtonCount) @MSGButtonDelay < if{ @MSGButton } } }Essential is the update:When you press the button, the clock goes on and after the desired time (25) the event happens, "your dimpage becomes visible".When you stop pressing before the desired time is achieved the event cannot happen but another one can("your pages 1 or 2").I know this one works, cause i have such a button function in mu FMCYou still need some puzzling, but may be this is of help,Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment