Stop all this macro

my friends
i create a macro with loop
and i want to stop all this macro after 30 minutes
how can i do this, please

thunks

Like this (starting with "Otherwise, to loop…"):

please can you show me in screenshot
please

Keyboard Maestro Actions.kmactions (1.4 KB)

my friend
whet that you send me
i need to putt it before the loop
or after the loop
or in the beginning of the macro

the macro now dont work
with the now function

You need to put whatever you are doing within the loop, where the Do Stuff comment is.

Here a working example of @peternlewis' macro:

[demo] While Loop.kmmacros (2.7 KB)

To run the demo macro press F1, or, if you have KM 8.0.3, press ⇧⌘R in the KM Editor while the macro is selected.

What you have to do:

  • Replace the Speak Text action with your actual looping actions.
  • In the calculation replace the "10" with the duration you want. For example 30 minutes is 1800 (seconds); you can also write 30 * 60
  • Read a bit in the KM Wiki, for example this article.