02/10/12 20:00:05

Make user input more convenient in Keyboard Maestro macros

I’m currently working on a Markdown library for Keyboard Maestro 5. I wanted to make these macros universally usable. The macros prompt for user input for links and images. My idea was that the user would be able to switch windows however he or she pleases and the macros would come back to the editor after all input has been collected.

The trick is to use a variable. Keyboard Maestro can use variables to execute various actions in the Use Variable action, e.g. “use variable to set the front application by name”

I have one more action in my macro that I generally like to add, which basically just Set Variable to %Delete%. This deletes the variable from the Keyboard Maestro system. It won’t show up anymore in various places.

I have graphically grouped the three parts of this macro in the screenshot below.

  1. Initiate variable and set it to name of front application name.
  2. Before this action the user can input something. 2. refocuses the app that was frontmost when the macro was executed.
  3. Delete variable.