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

Tweak required in Applescript

Participant ,
Jun 22, 2016 Jun 22, 2016

Hi Can any help me to tweak below mention script

Concept : this script will save .eps to current open .ai file location

Problem : But i want to add an specific file name for example ( filename_EPS.eps) even i did the specific file name also, But i am getting .ai from current open file

see this | Screen Shot 2016-06-22 at 2.44.10 PM.pngwhen i save my file

tell application "Adobe Illustrator"

activate

  set theName to name of current document

  set theNamecount to count of theName

  set theOutdatedPathObj to the file path of current document

  set thePath to (POSIX path of theOutdatedPathObj) as string

  set pathCount to count of thePath

  set pathCount to (pathCount - theNamecount)

  set newPath to (text 1 thru pathCount of thePath)

  set fullPath to (newPath & theName)

  set EPS_Path to fullPath & "_EPS.eps"

save current document in file EPS_Path as eps ¬

  with options ¬

  activate

end tell

TOPICS
Scripting
460
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
Participant ,
Jun 27, 2016 Jun 27, 2016

giphy21.gif

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
Community Expert ,
Jun 27, 2016 Jun 27, 2016

The question is a little bit unclear for me. And I doesn't speak Applescript.

But if I understand you right, you want to do something like this:

alert (app.activeDocument.name.replace(".ai","_EPS.eps"));

Have fun

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
Participant ,
Jun 27, 2016 Jun 27, 2016

Hi pixxxel schubser

i want to export files into my current open location.

when export eps. I like to have a specific name at the end of the file name.

for Ex: filename_EPS.eps

BUT

I work these this in applescript but i am getting ( filename.ai_EPS.eps )

so its possible you to solve this problem in applescript, Javascript

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
Community Expert ,
Jun 28, 2016 Jun 28, 2016
LATEST

Sorry, like I said before: I don't speak Applescript.

But perhaps you can wrap this Javascript snippet in a do javascript. It is not complete but I think you should see the "new name"

tell application "Adobe Illustrator"

    do javascript " alert (app.activeDocument.name.replace(".ai","_EPS.eps"));  "

end tell

Have fun

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