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

Is it possible to create droplet?

Community Beginner ,
Mar 14, 2009 Mar 14, 2009
Is it possible to create a droplet in "illustrator cs"?
TOPICS
Scripting
14.4K
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 Beginner ,
Mar 14, 2009 Mar 14, 2009
Yes.
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 Beginner ,
Mar 16, 2009 Mar 16, 2009
Could you please provide me the steps how to create the droplet in "illustrator cs".
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 Beginner ,
Mar 16, 2009 Mar 16, 2009
I only know how to achieve this on a Mac using AppleScript. I believe you're on Windows?
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 ,
Dec 08, 2009 Dec 08, 2009

hello, i want to create an "action droplet" in illustrator (mac os). the results i want to get as output is a vectorised ai file (outlined) and a pdf from my ai file as input.  would really appreciate if you can help me out.

thx

regards,

Tesh

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
Contributor ,
Dec 10, 2009 Dec 10, 2009

not sure what you mean with "action droplet" ... an applescript droplet doing that should be something like this:

on open fLs
    repeat with file_ in fLs
        tell application "Adobe Illustrator"
            set file_ to POSIX path of file_
            open file_
            convert to paths (every text frame of document 1)
            embed (every placed item of document 1)
            save current document in file newFilePath as pdf with options {class:PDF save options, compatibility:Acrobat 5, preserve editability:true}
            close document 1 saving no
        end tell
    end repeat
end open

hope it helps;

cheers;

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 ,
Dec 10, 2009 Dec 10, 2009

To explain, in Photoshop there is an option below Batch… for Create Droplet…

File>Automate>Create Droplet…

Picture 1.jpg

You are given the option of taking one of your existing Actions, and creating a Droplet from it, which looks like this:

Picture 2.jpg

You can place this Droplet anywhere you want on your system, and whatever file you drop on this Droplet, has that set of Actions applied to it.

Here is the Droplet setup screen.

Picture 3.jpg

It is very convenient for repetitive actions, and it would be nice to see this implemented in Illustrator, too.

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
Contributor ,
Dec 10, 2009 Dec 10, 2009

thanks for the clarification ... i normally program/script my own stuff so i was not aware of the dropplet option for photoshop. However this script should do what it was asked above on a mac:

on open fLs
    repeat with file_ in fLs
        tell application "Adobe Illustrator"
            set file_ to POSIX path of file_
            open file_
            convert to paths (every text frame of document 1)
            embed (every placed item of document 1)
            save current document in file (dirname(file_) & "/export.pdf")  as pdf with options {class:PDF save options, compatibility:Acrobat 5, preserve editability:true}
            close document 1 saving no
        end tell
    end repeat
end open

on dirname(thePath)
      set thePath to quoted form of POSIX path of thePath
      do shell script “dirname ” & thePath
end basename

hope it helps;

cheers;

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 ,
Dec 10, 2009 Dec 10, 2009

Okay, I found where the scripts go, but when I test this it comes back with an unexpected end of line in:

do shell script “dirname ” & thePath

Here's the error it gives:

Picture 1.jpg

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 ,
Dec 11, 2009 Dec 11, 2009

It would be nice for a lot of things in scripting to be more standardised across the applications but it ain't goin to happen.

Here is my take on Sonic's AppleScript Droplet (I've gone none POSIX and used plain old HFS paths)

on open FileList

repeat with ThisFile in FileList

tell application "Adobe Illustrator"

open ThisFile

set docRef to the current document

tell docRef

set docName to name of docRef

set docPath to file path

set docParent to my getParentFolder(docPath)

set docBaseName to my getBaseName(docName)

convert to paths every text frame

embed every placed item

set newFileName to docParent & docBaseName & ".pdf"

save in file newFileName as pdf with options ¬

{class:PDF save options, compatibility:Acrobat 5, preserve editability:true}

close saving no

end tell

end tell

end repeat

end open

-- Returns a file paths parent directory as string

on getParentFolder(fPath)

tell application "Finder"

set parentFolder to container of fPath as string

end tell

return parentFolder

end getParentFolder

-- Returns the document name without extension (if present)

on getBaseName(fName)

set basename to fName

repeat with idx from 1 to (length of fName)

if (item idx of fName = ".") then

set basename to (items 1 thru (idx - 1) of fName) as string

exit repeat

end if

end repeat

return basename

end getBaseName

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
Contributor ,
Dec 11, 2009 Dec 11, 2009

either that or ...

on open fLs
    repeat with file_ in fLs
        tell application "Adobe Illustrator"
            open file_
            convert to paths (every text frame of document 1)
            embed (every placed item of document 1)
            tell application "Finder" to set wDir to (get folder of file_)
            save current document in file ((wDir as string) & ":export.pdf") as pdf with options {class:PDF save options, compatibility:Acrobat 5, preserve editability:true}
            close document 1 saving yes
        end tell
    end repeat
end open

... save it as an application and drop any illustrator files on it ... it should outline your fonts and embed any images you may have ...

Choose what version fits your needs ... i tried to comply with Mark's approach as last time you encountered problems with the shell command.

hope it helps;

cheers;

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 ,
Dec 11, 2009 Dec 11, 2009

Sweet Action!

Does exactly what Sonic says it does.

Creates a PDF with outlined fonts and embedded graphics, while leaving the original AI file "unharmed."

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
Contributor ,
Dec 11, 2009 Dec 11, 2009

same does Mark's solution for which he deserves as much credit as I

one observation: my script does NOT leave the .ai file intact ... it saves it too as outlined ... if you want the illustrator file to remain unchanged you have to chnage the line "close ... saving yes" to "close ... saving no";

hope it helped;

cheers;

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 ,
Dec 11, 2009 Dec 11, 2009

No disrespect intended to Mark. I just couldn't figure out how to get his to work. When I pasted it into AppleScript, it came up with errors.

Re: leaving the file "unharmed," I just rechecked, and it does. I created a new AI file, created some text, placed a graphic, saved the file, and dropped it on the App. It created a PDF with outlined text and embedded graphics. When it completed it's process, I opened up the AI file, and checked. Fonts are live, not outlined. Graphics are still linked to their location on the drive (external file server in this case). If I open the exported PDF in Illustrator, it shows fonts are outlined, and graphics are embedded. But the AI file is intact.

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 ,
Dec 11, 2009 Dec 11, 2009

Non taken. ! easily offended as long as you have a workable solution then all is fine…

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 ,
Dec 11, 2009 Dec 11, 2009

When I tried yours again Muppet, it worked fine. I must have done something wrong the first time.

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
Contributor ,
Dec 11, 2009 Dec 11, 2009

One suggestion Mark ... maybe it will help you somehow:

why dun u use something like this:

on getBaseName(fName)

    set basename to ""

    set oDelims to Applescript's text item delimiters

    set Applescript's text item delimiters to "."

    if (count text items of fName) > 1

          repeat with ctx from 1 to ((length of text items of fName) - 1)

              set basename to basename & text item ctx of fName

         end repeat

     else

          set basename to fName

     end if

     set Applescript's text item delimiters to oDelims

     return basename

end getBaseName

should work a lil faster on long filenames rather than character by character approach.

hope it somehow helps;

cheers;

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 ,
Dec 11, 2009 Dec 11, 2009

Sonic, what was in my script was an out of Adobe's AppleScript guide handler for the base name its always worked so I've never tried fix it. Although I will take a look at your mod. I've various alternatives to this. You know how things are always bogged down with the things that you can't get to work or good examples are thin on the ground leaves little time to go back over covered ground.

I've been making notes on some of your examples of JavaScript with this App.

Im glad to see that this forums activity has picked up as of late gives me more to learn from.

Or is it that now Im trying to learn JS that I look at more posts here now.

Glad that mine worked too (always very frustrating when things work for me but then not for others that be bad coding)

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
Contributor ,
Dec 12, 2009 Dec 12, 2009

while being bored todya looking at the fresh snow getting on the tree infront of my apartments window, i thought that is somehow not fair for windows users that they cannot create droplets ... well here's a young version of something that is close to a windows droplet for illustrator, You need .NET Framework 2.0 in order to make this work:

hope it helps;

cheers;

Later edit: for the moment it works only with files(not directories - if you`ll drop a directory probably it will bark); you can set it's properties(what to run, where to save etc.) by double clicking the file, and make it run by dropping files on it;

Owh ... and for the moment runs only with CS4 installed;

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 ,
Aug 15, 2010 Aug 15, 2010
LATEST

Thanks for the hint.

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 Beginner ,
Mar 16, 2009 Mar 16, 2009
Yes, i need for windows.
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 ,
Mar 26, 2009 Mar 26, 2009
You could try doing a batch conversion.
Start by creating an action (actions are listed under the the window menu).
Once you've created an action you can then run it as a batch.
Select the action you have created.
Next click the upper right corner of the actions panel and select batch from the drop down menu.
Locate your source folder and select a destination, then hit okay.
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 ,
Jul 24, 2009 Jul 24, 2009

Okay, but that is not really a droplet. In Photoshop you can create droplets out of your actions and it generates an miniature program that you save to your hard drive. From then on, all files dropped on that mini-program are submitted to the step outlined in the action (hence the name droplet). I've also looked for a way to do this in Illustrator CS4 and have not found a way.

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 ,
Jul 24, 2009 Jul 24, 2009

The Batch menu item is available in AICS4 as well as CS3. You can't save it as a droplet but it can perform the action on a whole folder of files.

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 ,
Jul 24, 2009 Jul 24, 2009

Yes, that's true, and in that sense it is useful, just not as useful as a droplet would be. The beauty of droplet is that it is set up once, and then it is available to you anytime you want to perform that action on a file (whether on a single file or a folder full of files). It's drag and drop, the way it should be.

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