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

PLace images in a selected Frame with Script ?

Advocate ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Hi All . I'm basically wondering if it would be possible to have a script with a list of about 10 Different pieces of art that can automatically place the in the Frame when I CLick on it. It wound matter if its a Named list or Pictures. A Mockup Picture is below if its possible.  If there is something like this please point me in that direction.Screen Shot 2017-02-02 at 1.13.15 PM.png

TOPICS
Scripting

Views

1.4K

Translate

Translate

Report

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

correct answers 1 Correct answer

People's Champ , Feb 02, 2017 Feb 02, 2017

Aren't libraries what you are looking for ? Drag and drop is probably close from one click

Votes

Translate

Translate
Advocate ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

var w = new Window("dialog");

w.spacing=0;

var headers = w.add("group"); headers.spacing=0;

headers.margins = [0,5,0,0];

var dimH=[0,0,150,20];

headers.add("statictext", dimH, "\u00A0Black");

headers.add("statictext", dimH, "\u00A0Color");

headers.add("statictext", dimH, "\u00A0White");

headers.graphics.backgroundColor = w.graphics.newBrush(

w.graphics.BrushType.SOLID_COLOR,[0.7,0.7,0.7], 1);

for(var i = 0; i < headers.children.length; i++)

headers.children.graphics.font = ScriptUI.newFont ("Arial", 'BOLD', 12)

var columns = w.add("group"); columns.spacing=0;

var dimC=[0,0,150,200];

var ml;

mL = columns.add("listbox", ["0", "0", "150", "350"]);

 

    with (mL) {

// for (var i = 0; i < 1; i++)  

      var listItem1 = mL.add ("item", "Test Art1" )

      var listItem1 = mL.add ("item", "Test Art2" )

       mL.onChange = function() {

    var curSelection1 = this.selection.index;

    //alert ( "You clicked item: "  + this.selection.index );

    switch (curSelection1) {

      case 0:

        app.doScript(script1);

        break;

          

    }

  }

}

function script1(){}

 

 

//var col1 = columns.add ("listbox", dimC, ["Art1","Art1","Art1"]);

var col2 = mL = columns.add("listbox", ["0", "0", "150", "350"]);

 

    with (mL) {

// for (var i = 0; i < 1; i++)  

      var listItem1 = mL.add ("item", "Test Art3" )

      var listItem1 = mL.add ("item", "Test Art4" )

      }

var col3 = mL = columns.add("listbox", ["0", "0", "150", "350"]);

 

    with (mL) {

// for (var i = 0; i < 1; i++)  

      var listItem1 = mL.add ("item", "Test Art3" )

      var listItem1 = mL.add ("item", "Test Art4" )

      }

w.show();

This list's it like i am wanting.  But how do i get the functionality to WHen its clicked it past's my EPS/AI/PSD file in the selected frame?

Votes

Translate

Translate

Report

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
People's Champ ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Aren't libraries what you are looking for ? Drag and drop is probably close from one click

Votes

Translate

Translate

Report

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
Advocate ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Libraries is exactly what i want.  I was playing around with CC Library And drag and drop would be perfect.  However many of us use the same indd files.  And we work from a server.  So if i use my CC library files and someone opens up the file they will have to relink everything on every file i do.  Unless theres a way to make CC library link directly to our Server Folder.  Thats why i'm trying to script it so that way no one will have to relink when they open the file

Votes

Translate

Translate

Report

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 ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

CC Libraries? Scripting CC Libraries is not easy.


Alternatively consider InDesign Library files (*.indl).
The scripting DOM is more open to script them:

Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents, Libraries Suite

Adobe InDesign CS6 (8.0) Object Model JS: Asset

Adobe InDesign CS6 (8.0) Object Model JS: Library

InDesign libraries are actual files. You can store them in your server.

Assets could be page items and whole layouts.

You are even able to store selected guides.
( CC Libraries cannot do this.)

You can selectively view assets in InDesign libraries.

Problem perhaps:

You cannot control access to libraries with several users.

Everyone could add and remove assets.

If images should be used as assets simply make sure that you place the images from folders on your server.
Place them and then store them as assets into a library. The links are maintained, if you drag them out to your layouts. At least that's the case with my Dropbox experiment I did with two Macs where I stored an InDesign library from CS6 and had access to it with CS6 on two Macs in my network.

Other problems?

To see if someone else in the network updated a library you have to close and re-open the library.

Make sure that all participants are on the same version of InDesign.

Regards,
Uwe

Votes

Translate

Translate

Report

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
Advocate ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Never Mind I never knew you could make you own.  THis is 100000% what i was wanting.  Thank you very much.

Votes

Translate

Translate

Report

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 ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

cbishop01 wrote:

Never Mind I never knew you could make you own. THis is 100000% what i was wanting. Thank you very much.

I think you first (or still?) confused CC Libraries ( Adobe Web service, its panel is available with InDesign ) with InDesign Libraries that are available since—I don't know—InDesign CS2 or CS3?

The both library types are not the same.

With CC Libraries you can exchange assets between different apps like InDesign, Illustrator and PhotoShop.

Not so with InDesign Libraries. With inDesign libraries you stay in the inDesign eco system.

However you can convert InDesign Libraries to CC Libraries. With some penalties…

Regards,
Uwe

Votes

Translate

Translate

Report

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
Advocate ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

LATEST

Yes at first i thought there was only the CC Library.  I then went through the Menu's and fount the File>New Library and used that and works like a charm. We will more than likely never use CC Library so the Indesign Library is exactly what i needed.  Thanks again. 

Votes

Translate

Translate

Report

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