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

Help with a batch Macro / Script / Action

New Here ,
Sep 20, 2018 Sep 20, 2018

I'm basically just trying to change multiple.ai files, they all have a text box that says "Fall 2018" and I want them all to change to "Winter 2018".

However, I also need to figure out how to change the font size of "Winter" so that it will fit in a text box, as well as change a layer title from "F18" to "W18".

Do you know an efficient way of doing this rather than just going into 200 files and manually changing them?

Any help is appreciated. Thank you!

TOPICS
Scripting
820
Translate
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 ,
Sep 20, 2018 Sep 20, 2018

Which version of Illustrator are you using?

Can you share a meaningful sample .ai file with some instructions?

Translate
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
New Here ,
Sep 20, 2018 Sep 20, 2018

Hello Kurt,

I am using Illustrator CC.

Here is an example file: Shared Files - Acrobat.com

Translate
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
Advocate ,
Nov 24, 2018 Nov 24, 2018

Hello!

I can make this script, my coordinates are under my profile picture.

From Elleere

Translate
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
Valorous Hero ,
Nov 24, 2018 Nov 24, 2018
LATEST

While you may use a script to act upon your existing files, going forward you can make use of Adobe Illustrator's Variable Data feature and use extra scripts for fitting text into a box if the font size makes it overset. This would be useful if you anticipate similar work in the future whereby afterwards such changes are necessary.

The official Adobe implementation as of March 2018 is here: Merge data to create data-driven graphics through templates and variables in Illustrator

My own VI script is available here, still quite useful and better option for those CS6 users:

http://hypertransitory.com/blog/2015/04/26/illustrator-variable-data/

Then you can use a script in your batch processing to shrink font sizes:

Adobe-Illustrator/DealWithOversetText_SingleLine.jsx at master · Silly-V/Adobe-Illustrator · GitHub

Note: when this script is used with 1st record active, it sets the 'original size' into a scripting tag and subsequently resets the text to this size on each dataset before determining the overset. It removes the tag on the last dataset. You can read more about it here:
Adobe Illustrator Variable Data​: dealing with overset text.

Translate
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