Count down

Share your favorite FastKeys commands
Post Reply
Posts: 1
Joined: Mar 12th, ’20, 20:49

Post by Captionist » Mar 12th, ’20, 21:08

Is there a way to do a countdown, I need to post an announcement often like:

Announcement: We are having [event] at 18:00 (xx minutes from now)

I would like to have the (xx minutes ....) generated automatically

Any ideas / help will be appreciated
User avatar
Posts: 362
Joined: Nov 24th, ’15, 23:39

Post by Tom » Mar 13th, ’20, 12:51

Type: Command


First macro is a Manual Text Input (__EventTime), note a "_" no output prefix. Must be in HH:MM format.
The second macro is Insert Command Code with the following code:

Code: Select all

Time := INPUT__EventTime
FTime := A_YYYY A_MM A_DD RegExReplace(Time, "\D") "00"

EnvSub, Minutes, FTime, minutes

Send, % "Announcement: We are having [event] at " Time " (" Minutes " minutes from now)" 
Post Reply