How to Repeat Triggering a Macro Based on a Variable Value?

I am using this currently:

But the problem is I will need to change '30 minutes' time (shown in the screenshot), frequently to maybe 15 minutes or 90 minutes etc depending upon the situation.

Having a variable set would be handy so that I can change the variable value quickly – otherwise each time I'll have to open this macro in KM and edit the minutes.

You can easily set a value by triggering a shortcut or by clicking on a Keyboard Maestro palette…

Set a macro that asks you for what the value should be and you can change the variable every-time you run the macro

And Instead of putting the time there you can put your variable there…

What is the purpose of your macro? There may be another solution.

Ok in that case, let me let the things flow the way they are. In case it really bothers me, I'll get back here.

This is not a difficult problem to solve, once you accept the limitations of Keyboard Maestro and stop trying to insert a variable into the periodic trigger.

Set the periodic trigger to every 5 minutes and then use a global variable with a snooze time that's a multiple of 5. (You could make the trigger period shorter of course, but why load the system when you don't need to.)

Currently the macro is set to 15 minutes.

Download: Periodic Trigger Using a Variable v1.00.kmmacros (8.1 KB)


Keyboard Maestro Export

  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2


I tried but could not understand the macro you shared. I didn't understand how it works and I didn't understand how do I implement.

I don't know in how much detail is enough to tell you after @ccstone shared the macro, but I am trying to get a pop up using prompt user input action periodically. It would enlist my calendar events as text. Next would be a list of these calendar events in prompt with list action, which would let me choose any of these events and then execute steps further upon choosing an event from the list.

This list is nothing but the tasks (calendar events) I have been putting off that day (snoozed events) for which I want to get reminded that I have some events pending to be executed.