Why do some actions not have timeout options (like "Timeout Aborts Macro")? Do they never fail?

Some actions like "Set Variable to Text" do not have the options "Set Action Timeout," "Timeout Aborts Macro," and "Notify on Timeout." Why is that? I can't image their failure rate is 0. Any is there any value in putting in checks, such as "Pause Until.." or "If" actions, after the ones without timeout options to ensure the macro only continues if these actions are done?

The absence of those options makes sense to me by the following logic...

The action Set Variable to Text does not depend on the state of anything outside Keyboard Maestro. If the action were to fail, that would be a very obvious and most unlikely bug within KM. [1]

By contrast, the action Set Variable to Front Browser Field has the options "Failure aborts macro" and "Notify on failure" because something could theoretically go wrong with the browser or KM's interaction with it.

Unless you find or consider that there is a realistic chance of failure [2], I would say there is no point in worrying ahead of time. However, you might find the wiki entry on Try/Catch of interest.

  1. Adding code to check that such code works would then need code to check that the code that checks the code works and so on...! ↩ī¸Ž

  2. As you suggest, the failure rate of anything shouldn't be assumed to be zero. It is therefore a good idea to make sure that any failure will not be catastrophic – keeping backups is of course essential, but if you need anything fancier, don't expect any one application to be the most reliable monitor of its own reliability! ↩ī¸Ž

1 Like

Only actions that can take an unlimited amount of time have timeouts. Actions that do their job and immediately complete (failure or no) do not need timeouts.

So Set Variable to Text action does not have a timeout because it cannot take any significant amount of time.

1 Like

Makes sense. Thank you both.

1 Like