Skip to main content
pctechtv
Inspiring
January 28, 2021
Question

Script to copy artboard bounds to clipboard.

  • January 28, 2021
  • 2 replies
  • 1393 views

Hi, I wondered if anybody has a script that can copy just what is contained inside the bounds of your current artboard to the Windows clipboard? Thanks

This topic has been closed for replies.

2 replies

renél80416020
Inspiring
January 28, 2021

Salut!

Si j'ai bien compris...

// JavaScript Document for Illustrator
var doc = app.activeDocument;
    with(doc) {
      selectObjectsOnActiveArtboard();
      fitArtboardToSelectedArt( artboards.getActiveArtboardIndex() );
    }
    app.copy();

 

pctechtv
pctechtvAuthor
Inspiring
January 28, 2021

Hi, thanks so much for trying. I do not want to move the artboard to encase the art. I want to use the Artboard as a crop for what Is shown. What you wrote moves the artboard to the art. If a piece of art is outside of the artboard I want it cropped (not included) in what is copied as a jpeg.

pixxxelschubser
Community Expert
Community Expert
January 28, 2021

... to do what afterwards?

Please explain this in more detail.

 

At the moment I think:

 

select all in active artboard
and
copy

 

should be sufficient enough.

 

 

Or not?

pctechtv
pctechtvAuthor
Inspiring
January 28, 2021

Hi, thanks for the reply. I want it to be cropped at the bounds of the artboard. I also want it loaded to the clipboard as a jpeg. As for ... to do what afterwards? I want to use the clipboard in another program?