I'm trying to create a custom action for initializing a new document so that it has a rectangular path marking the artwork bounds, trim marks around that, and a few other helpful guides and such on various layers.

These are things I find myself needing to create repeatedly for designs of various dimensions, so rather than repeat this process many times creating different templates, creating an action to handle all sizes seems more logical.

The problem is that there is no "Resize Selection to Artboard" option that I can record into my action, and it seems like the only solutions that exist are scripts (1, 2). Can scripts be triggered within an action? I tried doing this as a test, but the script execution was not recorded in my action.

I've also tried creating a rectangle of dimensions 100% by 100%. Of course this didn't work, it just defaulted to 100mm.

I'm pretty much open to any solution that can get a rectangle to fit the bounds of the artboard through an action. Thanks.

2 Answers 2


Scripts can be triggered by actions if they are located in the scripts directory and thus visible in File → Scripts folder. You do this by using the insert menu item... command in your actions panel hamburger menu.

However, there is a very recently fixed bug in Illustrator*, that prevents illustrator from remembering the script file location when you open it the next time. This bug can be circumvented by unloading and then reloading all your scripts after the software has loaded up. Essentially the init sequence is wrong. But if you are on subscription you might as well get the newest version, which unfortunately has not landed on my managed desktop yet. But this makes using this kind of stuff in batch pretty hard on older versions of illustrator.

But do put everything in a script its more flexible.

* finally its not like we haven't complained for years and years. In fact its the second feature of CC that i actually would use, good job.


There is an action to resize objects to fit the arboard.

Here is the link:


  • Thanks, but that's a script, not an action. And I referenced that link in my question. I want the resizing to be one step of many in an action, however it seems that scripts are ignored within actions. I'm starting to think that what I'm trying to do might be impossible...
    – Mentalist
    Nov 24, 2017 at 10:54
  • 1
    @Mentalist scripts aren't ignored in actions its just that unless you have the newest new CC version installed. Illustrator will not remember that script location next time you start, you can circumvent this by unloading your actions and reloading them then it works.
    – joojaa
    Nov 24, 2017 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.