Open Outlook Calendar on login if between 6AM-9AM

I'm brand new to Keyboard Maestro.
I would like to conditionally trigger a macro when I login to my computer.
The condition being that the macro only runs if the computer clock is between 6AM - 9AM.

I would like the action to be Activate Outlook and display the Calendar (which is a shortcut of Command+2).

I'm guessing there might be a way to do this with an if/else action but I'm having trouble figuring it out. Any help/suggestions would be greatly appreciated.



Something like this should work:

Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.


MACRO:   Open Outlook Calendar On Login [Example]

-~~~ VER: 1.0    2021-01-20 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Open Outlook Calendar On Login [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.

Thank You so much! That seems to do the trick!