Dialog with timeout

Firstly apologies as I'm a novice with this. I can usually find my way around most things using examples online, but I'm struggling to get past something that seems like it should be possible/simple.

In brief, I want to automatically close an application at a certain time daily, but first display a dialog and wait a (brief) period of time, giving me an option to cancel in case I am actually still working.

I assumed I would add a prompt, then set the timeout on that prompt. The prompt has only a 'cancel' button that is set to cancel the macro if clicked. The 'quit' action then follows this.

When I test it, the dialog displays and times out as I'd expect, but the following action is never run. What am I missing? :slight_smile:

As an aside, I did try searching the forum on various keywords, but none really matched exactly what I'm doing. I of course found 'custom HTML prompt' but the examples there are massive overkill for what I need. They also have to be reverse engineered (considerably) to do what I'd like.

Any pointers very much appreciated!

Think I just found it, though unclear if what I did is the 'right' or 'best' way. I simply added the prompt and quit actions to a group. The quit action now fires when the dialog times out.

Did you untick Failure aborts macro under the gear icon?

Yes, I did. :slight_smile:

To be clear, I meant in the dialog, not the group.

This is how I would do it using native Keyboard Maestro actions:

Quit or Keep Working?.kmmacros (21 KB)

Macro screenshot

Prompt for User Input timeout settings:

However, I think a timer would be nice, so how about this instead?

Quit or Keep Working? (HTML Prompt).kmmacros (26 KB)

Macro screenshot

Firstly yes, I meant the dialog.

But what you've produced is MUCH better, so thanks for that. I had weighed up that option (actually envisioned a button with a countdown) but knew it was going to exceed my skills, so settled for the simplest possible solution.

This works beautifully. Thanks again!!

1 Like