How to pause for Adobe Illustrator Action?

I am running an Adobe Illustrator Action from a macro and don't know how to force the action to complete before the macro continues. I've tried "Pause Until" and selected a Menu Item, but this is not working. I assume it is because the menu item may be enabled during portions of the Action sequence.

Any suggestions? I could just run the macro in two parts. Was just hoping to keep it one macro.

You're on the right track. Using the Pause Until is the right Action, and is very powerful.
The key is finding some condition that KM can detect which changes after the Illustrator action has completed. Take a look at all of the conditions that Pause Until action can use. Maybe that will give you some ideas.

1 Like

Here is a solution:

  1. Create a JSX file somewhere with a simple function to execute the Illustrator action and return a value:
function test() {
	app.doScript('Test', 'Default Actions');
	return 'OK!';

  1. Create a macro in Keyboard Maestro to execute the JSX file through AppleScript and save the result in a variable:

  1. Add a "Pause Until" and wait until the variable is equal to the value returned by the JSX:

  1. The rest of your macro…