How to Display Time

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
lemodizon
Posts: 219
Joined: Thu Apr 05, 2018 3:33 pm

How to Display Time

Post by lemodizon » Wed Nov 07, 2018 6:20 am

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
Attachments
Time.PNG
Thank you & God Bless Everyone :wink:

Regards,
lemodizon

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: How to Display Time

Post by bn » Wed Nov 07, 2018 8:35 am

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

lemodizon
Posts: 219
Joined: Thu Apr 05, 2018 3:33 pm

Re: How to Display Time

Post by lemodizon » Thu Nov 08, 2018 2:58 am

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
Thank you & God Bless Everyone :wink:

Regards,
lemodizon

Post Reply