Run an Action automatically when opening documents

I recently received a support email asking if it were possible for the Select Menu plugin to automatically select certain art types every time a document is opened. That feature was built into the plugin Select Effects by Worker72a, which is no longer available. The four effects types in Select Effects are also in the latest free version of Select Menu, and what they called “Autoscan” is possible using the Worker72a plugin Tag72a, available here at Graffix.

Tag72a can automatically run scripts at several events such as opening or closing a document, and to simplify things, a script can simply run an Action you record. So no scripting skills are required!

Here’s how to do it:

  1. Record an Action in Adobe Illustrator doing whatever you want Illustrator to do when you open a document.
  2. Name the action “on_open” and make sure that it is in the Default Actions set.
  3. Quit Illustrator.
  4. Download this sample script file, unzip it, and place the file “Tag72a_doc_open.jsx” in your Scripts folder (not the Scripting folder, but the one in your Presets folder).
  5. Download the plugin Tag72a.
  6. Install the plugin file Tag72a.aip in your Plug-ins folder.
  7. Launch Illustrator.
  8. Open the Tag72a panel from the Windows menu, and make sure that the “Run user scripts” item at the bottom of the Tag72a panel is checked.

Now anything you record into the Action “on_open” will automatically happen every time you open a document.

For those of you comfortable with scripting, here’s the JavaScript code:

if (documents.length > 0){ // if a document is open
    // Define the action set and action name 
    actionSet = "Default Actions"; // Replace this with the actual name of your action set 
    actionName = "on_open"; // The name of the action to run 
    // Run the action 
    app.doScript(actionName, actionSet);
}

More information on the auto-run scripts with Tag72a is available here in the Tag72a online documentation. Tag72a is not free, but it does come with 500 free trial uses, so you can test it at your leisure.

I hope you find it useful.

Rick