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
Count down
-
- Posts: 1
- Joined: Mar 12th, ’20, 20:49
Type: Command
%INPUT__EventTime%%CODE_TimeDifference%
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:
%INPUT__EventTime%%CODE_TimeDifference%
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
Minutes:=abs(Minutes)
Send, % "Announcement: We are having [event] at " Time " (" Minutes " minutes from now)"