Jump to content
Sign in to follow this  
Guest greenco

Time Display Help

Recommended Posts

Guest greenco

Tom, I can not get the timer gauge to work, using your code. I have included my code for you to look at. I am sure that it is something simple, that I am missing, but right now my old brain is in overload. When the panel loads, with the following code, the timer shows a functioning clock. When I click nothing happens and the clock continues to run. With Jan's code, when the panel loads, the timer shows " 00:00:00 " and does not change until I click the mouse. It then shows the " Time " at the time of my mouse click. This value will remain the same, unless I click again. If you or another XML guru has a solution to fix this, I would welcome your advice.ThanksgreencoTimer 1 (P:Zulu time, seconds) (>L:FixedTime, seconds) %((L:FixedTime,hours) int)%!02d!%:%((L:FixedTime, minutes) 60 % int)%!02d!%:%((L:FixedTime, seconds) 60 % int)%!02d! (M:Event) 'LeftSingle' scmp 0 == if { 1 (>L:FixedTime,bool) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:FixedTime,bool) }

Share this post


Link to post
Share on other sites

Greenco,The correct code is:(P:Zulu time, seconds) (>L:FixedTime, seconds)Each time you click the mouse the current time is saved to the "FixedTime" variable.Tom

Share this post


Link to post
Share on other sites

Hi,Of the record and may be known for a long time, but you can SET the plane's LatLon also with Tom's formula elixer:Read:%((L:LAT,degrees) d 0 >= )%{if}%N%{else}%S%{end} %( abs d flr )%!02d!

Share this post


Link to post
Share on other sites
Guest greenco

Tom, something is still wrong. I replaced my "Mouse" code with your code and the gauge still gives me a working clock and the mouse click does not do anything. It is as if the " (P:Zulu time, seconds) (>L:FixedTime, seconds) " is set to "1" so the clock is running when the panel loads. Should something be changed, so that the clock is not running, when the panel loads?Thanksgreenco

Share this post


Link to post
Share on other sites

Greenco,Sorry, I only focused on structure and didn't pay attention to the group in your code.Please remove this:(P:Zulu time, seconds) (>L:FixedTime, seconds)Which is actually updating the LVar continuosly, making it work like a clock, as noticed.Tom

Share this post


Link to post
Share on other sites
Guest greenco

Thanks Tom, I thought that was the problem. I didn't know that I could remove it, since it was used in the mouse area. It now works "GREAT" and the code is much cleaner. I will keep it for future references.Thanks a million for your help!!!greenco

Share this post


Link to post
Share on other sites

hi,Did you notice the LatLon stuff?Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest greenco

No, I missed it, but I just went back and looked at it. I will also put this one away for future use.Thanksgreenco

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