Count Down Break Timer

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Thu Feb 09, 2006 1:31 am

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

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Feb 09, 2006 8:27 am

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%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Mon Apr 03, 2006 12:28 pm

mtettmar wrote:Yes, the request to have separate tick boxes for the common switches has already been made and is on the wish list.
Is This A Feature That Will Be Released Soon?
FIREFIGHTER

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts