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

Scripting Illustrator actions, incorporating calls to Excel

New Here ,
Apr 02, 2010 Apr 02, 2010

Hello all, I need some help...

I am building a series of logos — based on word strings —  using Illustrator CS4 with a combination of Actions, but also retrieving the word string from an Excel file.

Normally for one or two iterations of the process, I would not hassle with a script, but this is a mind-numbing repetitive task, and I have to make 6,000 logos!! Seems the ideal use for a script.

We have tried to work with ExtendScript Toolkit (ESTK) but we can't get our heads around how to make it do certain things, and I can't find anyone who really knows how to use ESTK correctly.

I have a MAC, so the script has to be written in Java Script or Apple Script.

Here's what I need to do:

  1. Execute Action: Open a Master Illustrator doc. This doc is already configured with art board, pre-defined type box (Area Type Optioned), Charater Styles, Drop Shadow parameters set. <pause Action>
  2. Run Script: Retrieve the word string from a cell in Excel worksheet (or CSV??). Some are single words, first letter capped. Some are two to four words Camel Cased. Example: "DinnerPartiestm". There are two additional charaters "tm" at the end of the word string that will be acted upon (remember these two characters for item 7 below)
  3. Run Script: Place this WordString into the predefined type box in the Illustrator Master doc. That is, in Illustrator, "select" the type box so the cursor is at first position and place the word string — copy from Excel & paste into Illustrator? <pause Script>
  4. Execute Action: Apply character style 1— font with point size, letter spacing, stroke and colour (It just happens to be red). Example: DinnerPartiestm  <pause Action>
  5. Run Script: Select all caps in word string. Example: DinnerPartiestm <pause Script>
  6. Execute Action: Apply character style 2 — Caps Only (selected) — New point size, baseline offset. Example: DinnerPartiestm <pause Action>
  7. Run Script: Select last two letters of word string. Example: DinnerPartiestm <pause Script>
  8. Execute Action: Apply character style 3 — last two letters only (selected) — New point size, change colour, baseline offset. Example: DinnerPartiestm <pause Action>
  9. Run Script: Select text box. <pause Script>
  10. Execute Action: Apply Stylize > Drop Shadow — On contents of text box, preset DS parameters in either Appearence panel or Effect menu.
  11. Execute Action: File > Save As .ai document. <at Save As dialog, pause action>
  12. Run Script: Retrieve file name from Excel and place in Save As dialog (copy & paste?). In next column in Excel doc, same row, is a SEO-friendly file name. Example: word string is "DinnerParties"; file name (next column) is "logo-dinner-parties"
  13. Run Script: Select folder to save the .ai doc into. Example: Folder is "Logos AI". <pause Script>
  14. Execute Action: Complete Save As. Example: in Folder "Logos AI" now we have the file "logo-dinner-parties.ai"
  15. Execute Action [assumes that the Saved As document — logo-dinner-parties.ai — is now the active one in Illustrator]: Save for Web & Devices. Preset to PNG24/Transparent. Correct file name will NOT be in Save field. <at Save dialog, pause action>
  16. Run Script: Repeat retrieval process to get same file name from Excel.
  17. Run Script: Select new folder to save the .png doc into. Example: Folder  is "Logos PNG". <pause Script>
  18. Execute Action: Complete Save for Web. Example: in Folder "Logos PNG" now  we have the file "logo-dinner-parties.png"
  19. Execute Action: Close
  20. Repeat steps 1 though 19 until all word strings processed: Script has to know to go to next word string (next row) in Excel doc.

This is a tricky one, but there's got to be a way to automate the process... otherwise I'll go crazy doing this manually!!

IS THERE ANYBODY OUT THERE WHO CAN HELP?

Thanking you in advance for any assistance.

All the best.

TOPICS
Scripting
18.7K
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

correct answers 1 Correct answer

Guide , Apr 04, 2010 Apr 04, 2010

Just a muppet 4 now… but one day maybe a star…

Hope it works as you wished…

Translate
Adobe
Guide ,
Apr 04, 2010 Apr 04, 2010

Test on less than 6000 otherwise you'll be watching Doctor Who again while u wait…

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 ,
Apr 04, 2010 Apr 04, 2010

Yeah, and not until next week!!!!


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 ,
Apr 04, 2010 Apr 04, 2010

You, Sir, are a f*cking STAR!!!!!

Man, it is actually fun to watch!!!!!

Flawless....

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 ,
Apr 04, 2010 Apr 04, 2010

Gotta go walk the dogs... they are staring at me....but I'll PM ya when I get back.....

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
Guide ,
Apr 04, 2010 Apr 04, 2010

Just a muppet 4 now… but one day maybe a star…

Hope it works as you wished…

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 ,
Apr 04, 2010 Apr 04, 2010
LATEST

OK... back from walkies....

I've tested the results every way possible, and they are perfection!!

Absolutely stellar....super-nova-f'in'-quasar.

To all the others looking in on this thread — and I'm surprised with the volume of readers — Muppet is the go-to guy!!

I gotta tell you, this thing had everyone else I contacted (outside this forum) stumped.

When we launch, I'll post a link to the network for all of you to see Muppet's handiwork.

All the best,

Steve

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
Guide ,
Apr 04, 2010 Apr 04, 2010

There are 3 edits already made to my last script post you can just cut & paste the code from the forum.

line26

compatibility = Compatibility.ILLUSTRATOR14;

line 51

//var dropShadow = graphicStyles.getByName('Shadow');

line 73

//dropShadow.applyTo(genericText);

The double '//' at the beginning of these mean these lines are NOT now used by the script… Or you could just remove them…

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 ,
Apr 04, 2010 Apr 04, 2010

Hey Mark....

Sorry to be a hassle, but have you changed anything in the script from the one you sent me earlier?

Else, you'll have to send again....

MARK... belay that, I found out I can copy and paste... I thought it was an image....

Steve

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