Skip to main content
Known Participant
March 19, 2022
Question

Illustrator Script to save the clipboard in desktop

  • March 19, 2022
  • 1 reply
  • 825 views

Hi All,

 

Is it possible to save the clipboard image in the desktop using script? And save the clip board image into swatches then apply as color to selected layer via scripting.

This topic has been closed for replies.

1 reply

Mylenium
Legend
March 19, 2022

I'm not exactly clear what you mean by all that. If it's AI data, all that would be required is to paste it to a new document. Otherwise you don't have access over pixel data and savcing it to your computer directly would be done much more efficiently using your system's screenshot & clipping tool. Conversely, adding stuff to a swatch requires to sample a color using the eyedroper or creating some sort of selection to e.g. generate a pattern swatch or brush.

 

Mylenium

Rocky@Author
Known Participant
March 19, 2022

Thanks for the update.

It's not AI image, need to save the image copy from the web(screenshot),  that image will save into swatches or pattern as you mentioned that color will  apply for AI images, this all need to be done via scripting. Is it possible?

 

Disposition_Dev
Legend
March 21, 2022

Illustrator probably isn't the right tool for this job.. Illustrator is designed for manipulating vector artwork, not processing raster images. There's no built-in way to just create a bunch of swatches from an image...

 

a potential workaround is to use Live Trace with a custom setting to convert the image into vector, then expand the image into a clean vector object, then select the artwork and do "add selected colors" from the swatches panel. theoretically all of that could be done with a script. 

 

but i just re-read your last comment... and i think i misunderstood what you're looking for. you don't want a bunch of swatches that match the colors in the photos... you want a script that automatically converts the copied image into a tileable pattern fill swatch? that's simply not going to be possible in AI.