Hello Marcus,
Thank you for your help on this script it works fine, pretty much spot on regarding the time as well.
What I was wondering though was could the count down actually show the correct count time time intsead of the decimal value?
Eg at the moment is have Time Remaining 17.83 Minutes.
Count Down Break Timer
Moderators: JRL, Dorian (MJT support)
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Converting from decimal time to minutes and seconds is easy:
For 17.83 you already have the minutes value - just truncate the decimal value. In this case 17.
You have .83 of a minute. So that is .83*60 seconds = 49.7999 seconds. Round that up to 50 seconds.
Code to do this would be:
Let>time=17.83
Let>Mins={Trunc(%time%)}
Let>Secs={(%time%-%Mins%)*60}
Let>Secs={Round(%Secs%)}
MessageModal>%Mins%:%Secs%
For 17.83 you already have the minutes value - just truncate the decimal value. In this case 17.
You have .83 of a minute. So that is .83*60 seconds = 49.7999 seconds. Round that up to 50 seconds.
Code to do this would be:
Let>time=17.83
Let>Mins={Trunc(%time%)}
Let>Secs={(%time%-%Mins%)*60}
Let>Secs={Round(%Secs%)}
MessageModal>%Mins%:%Secs%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia