Copy link to clipboard
Copied
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 |
when 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
Copy link to clipboard
Copied

Copy link to clipboard
Copied
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
![]()
Copy link to clipboard
Copied
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![]()
Copy link to clipboard
Copied
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
![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more