Page 1 of 1

How to Display Time

Posted: Wed Nov 07, 2018 6:20 am
by lemodizon
Hello everyone my question is regarding in TIME i want to see the seconds in TIME is running. i display the time (static) only. thanks in advance

Re: How to Display Time

Posted: Wed Nov 07, 2018 8:35 am
by bn
Hi lemodizon,

put this into your button

Code: Select all

local sRunning = false

on mouseUp
   put the long time into field "timeField"
   put the system date into field "dateField"
   
   if sRunning <> true then
      put true into sRunning
      send "doTime" to me in 1 second
   else
      put false into sRunning
   end if
   
end mouseUp

on doTime
   if sRunning then
      put the long time into field "timeField"
      send "doTime" to me in 1 second
   end if
end doTime
this will start and stop the display of time depending on the script local variable sRunning.
When clicking the button it will start the display, clicking again will stop it.

Kind regards
Bernd

Re: How to Display Time

Posted: Thu Nov 08, 2018 2:58 am
by lemodizon
hello Bernd,
thanks for sharing and explaining the code i tried and it works :) :) the exercise is from the visual basic6.0 and i just tried it in livecode and it works. thanks for the support everyone. have nice day