Creating a timer using KM

I'm wanting to make a timer using KM that will count down from 90 minutes, ideally with some display within the menu bar on MacOS.

Ideally i would have a way to pause/resume the timer. The other thing I wish to achieve is to have some way to monitor the passing of 10 minutes on the timer, so I can trigger an alert every 10 minutes during a 90 minute countdown.

Anybody anything similar or ideas to achieve this?

saw this one recently:

Yeah unfortunately it doesn't have the specifics I'm looking to make :frowning:

btw, check http://macmenubar.com

thanks great resource. But still don't seem to find any in there that would give me that special 10 minute alert message during the countdown

ideally with some display within the menu bar on MacOS.

AFAIK, there is no way for KM to display anything in the menu bar, besides the KM menu extra.

Going the AppleScript way you can display a progress indicator in the menu bar, but KM is not using the “standard” way to run AppleScripts, for some different reasons (it would be OT to discuss this here).

You can, though, run AppleScripts from KM via Automator workflow action and restore the normal AppleScript behavior (i.e., displaying the progress indicator) this way. I’m doing this successfully for some scripts of mine where the progress indicator is essential.

But if your motivation is to do the task via KM (from the title of the thread: “using KM”), I would just scrap that requirement.

Ideally i would have a way to pause/resume the timer.

I think you could do this with a second macro that interacts with the main macro (untested).

The other thing I wish to achieve is to have some way to monitor the passing of 10 minutes on the timer, so I can trigger an alert every 10 minutes during a 90 minute countdown.

If I understood correctly, it should be possible to do this within the main macro.

thought about using Calendar?
Screen Shot 2020-03-19 at 11.56 AM

https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/CalendarScriptingGuide/Calendar-AddanAlarmtoanEvent.html#//apple_ref/doc/uid/TP40016646-CH97-SW3

1 Like

good idea, but I do need the ability to pause/resume on an active timer

thanks for the insight, any demo macros you know of or can point me in direction of on this?

As a starter, here some basic stuff, without bells or whistles:

Timer: nn Minutes (90 minutes default) <4460 200320T113244>-pty-fs8

Timer: nn Minutes (90 minutes default) <4460 200320T113244>.kmmacros (6.4 KB)

Gives a notification every 10 minutes

  1. Make sure the macro group, where the macro is in, is enabled.
  2. In the header of the macro, set the desired trigger and make sure the Triggered by checkbox is selected.
  3. Read the comment inside the macro and set the desired countdown time.
  4. Run the macro.

Not yet implemented: Another macro to stop/interrupt the timer.

Ok, as expected (speaking of an interruption mechanic), there are some stones in the way.

Definitely: It can be done via KM. But:

It will be clumsy, inelegant, and honestly I do not want to invest the time into this, because:

There have been apps written for that (for example Due). Check out these apps.Probably they won’t give you a notification every ten minutes. But maybe they do, I don’t know (There is not just Due, there are also several other apps).

The issue when trying to do it with KM is that each instance of a macro ≠ app. We could transfer the latest state of the counter variable to a new macro instance and let it run, but then when you interrupt again? Ok, next macro…

It is possible that I’m missing the obvious, but IMO KM is not exactly the tool of choice for tis kind of things.

To other folks, please note the “It is possible that I’m missing the obvious” in my post above :wink:

So, any non-overly-clumsy KM solution is highly welcome.

thanks for trying anyway, appreciate it :slight_smile: