• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Script triggered by action

Community Beginner ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

I have an action that does exactly what I need it to do. One problem though, one of the steps is a menu item that I recorded. As I understand it, the File>Scripts menu is only stored into memory after you have navigated to it with your mouse. I am trying to run a batch of many files and a new document from batch hasn’t had the File>scripts menu accessed and stored into memory yet. I have searched everywhere trying to find a work around and haven’t had any luck. Is there anything I can do that can automate the process?

I am working with latest illustrator cc.

Please, any help is greatly appreciated.

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Is your script installed in Illustrator and can you access it directly in the Scripts menu? Or do you run it via Other Script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

It is a installed and accessible In my presets. File>scripts> name.js. It ceases to be recognized when new document is opened. I guess it has something to do with sub menus (scripts) not accessible until they have been traveled to by the mouse.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Which version exactly are you using?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Illustrator cc 2019

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

And your script is in a sub folder?

Can you please tell us exactly where your script is installed and exactly what the steps in your action are? And at which point exactly what does not work?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

You need to record the step where you select the script using the Actions panel Menu > Insert Menu Item...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

That is what I did.

This is from another post on here about the problem.

script menu is not loaded into memory and available for actions until after the user navigates to the File->Scripts menu.

This means that even if you save your scripted actions into a ,aia file if you don't view the scripts menu before loading the actions  you'll get an error "some event has not been registered for action" and your script menu items will not be loaded correctly.

On the other hand, if you first navigate to File->Scripts and then load the .aia file then Illustrator will load your scripted actions correctly.

It works perfectly when ran in an action but when a new document is created during the batch it is not accessible because it hasn’t been loaded into memory for new file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

I am not sure if I correctly undrstan what you mean.

If I create an action that creates a new file, adds an object and plays a script.

I can quit Illustrator

Open Illustrator

Play the action correctly without first navigate to File > Scripts >

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Does it still work if you run a batch for a folder with not documents open. That is the point it started to fail on me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

I don't know how to batch an action which creates a new document

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

in the actions menu i believe the bottom or close to the bottom there is a batch function. If you have multiple files that you are trying to process It will do everything in the specified folder. Very useful but lose scripts functionality after first file is processed saved closed and it moves to the next. Give it a try please if it works for you then maybe we can figure what is different between our two actions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

I know about the Batch option and I can use an action with a script on a folder with files.

That works.

I was not sure what you meant by New document:

"It works perfectly when ran in an action but when a new document is created during the batch it is not accessible because it hasn’t been loaded into memory for new file."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 15, 2022 Feb 15, 2022

Copy link to clipboard

Copied

LATEST

Hi Bro did you find the solution

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines