Default Button - using Prompt

Hi, just a very quick question, where I could not find a exact answer to this question in the forum. Even though, I would guess someone would have asked this question before and there should be some answers somewhere. So a link to that would be fine. Now the question:

I love using prompt windows and giving several options as buttons. So I can simply click and choose by clicking a button what the macro should do.

Most of the time I do use the same option though.

So the question is this: instead of moving your mouse over the button and click it, would it be possible to simply highlight one of the option buttons so I can at this prompt window simply push the enter key on my keyboard?

Any advice would be highly appreciated.


Know in case that first question get answered, there is also a second part to this question:
If I would manage to get this work with a default button as described above, I would love to have at my machine startup/launch macro this default button to be set, as well as a timer, giving me a couple seconds (5 to 10), to choose another button. If I won’t choose any other button, it would simply continue with the default button.

No this would make it possible for me to start my computer, and if I am in the default location I could simply go get myself a coffee, while the computer is doing all the launch and start up setup, instead having to sit in front of the machine and wait for the prompt windows to appear and choose the options (which most of the the times are the default options anyways).


Looking very much forward to your answer,
Arne

1 Like

There is also a KM WiKi that has answers to many questions. The first part of your question is answered here and here.

(In short: You can make any button the default button by appending a slash to the button name.)

If you click the gear icon of any KM action you find a direct link (“Help”) to the WiKi article explaining that action:

For the second part of your question, you could do something like this:

_[test] Default after Timeout.kmmacros (4.1 KB)


This will…

  1. Bring up a user prompt (purple action). The timeout of the prompt is set to 5s:

    (You find the timeout settings in the gear menu of the action.)

  2. If you manage to click a button before the timeout exceeds, the variable will be set to the button name (yellow action). Otherwise it will be set to the default value of your choice (green action).

Ah - awesome!!! Thank you!

Hi, so I did and so it worked. Great - so far. BUT unfortunately I have a IF function in there and it basically says:
(1) do you want to start 1Password? (Default is "no" ("Nein))
(2) ...IF Button Yes ("Ja") was pushed THEN start the 1Password action

... and my thoughts where that if I am simply saying ELSE and leave it blank it would continue with (4) the rest of the macro (which it actually also should run, if 1Password has been started - this is supposed to be just an additional option).

But somehow this does not work. So what I got instead is that if "Nein" (no) is pushed or automatically starts because of the timeout ... the macro simply stops right there... .

So the question is: What do I have to add in (3) where it right now says: "No Action", in order to have the macro simply jump to the next area (4) and continue there.

I do not want to copy the whole (4) block and have it added in (3) .. because this would simply be all redundant, which does not help anyone. Especially since I tempt to change these settings from time to time ... and then I would have to do the changes in both places... I really do not want to do this.

So the question is for (3) -> is there a function saying: "Continue with rest of macro" or something I could use in there?

THX so much for any reply or help! You guys are awesome!

  • Arne

Nothing. It works exactly like you think it does. So, the problem must be somewhere else in the macro.

Double-check all your assumptions. For example, you could put extra “Prompt” actions in, to make sure you know it’s executing what you think it is.