Find the element of object styles, and then copy it

Hello, I would like to create a script.

Find elements of object styles:

Outside of the document, I create on block with the style of the object "reference". It will be unique.

Once selected, I want to put it on the Clipboard or simply make a copy.

If selected by object styles is not possible, how can I do an id on my element?

Can you help me?

Thancks a lot!

YES!

I solved the problem like this:

var obj1 = app.selection [1];

var obj2 = app.selection [0];

Alert (obj1 and obj2);

obj1. Select();

App.Copy ();

app.loadFindChangeQuery ("PuceSimple_enPuceCouleur_Courant", SearchModes.grepSearch);

obj2.changeGrep ();

But I have a question.

How the script knows which is the number 0 and the number 1?

This is the order of selection? in position on the page?

Could be done as follows:

var obj1 is app. Docuement.Item ("reference");

var obj2 = app.selection [0];

Tags: InDesign

Similar Questions

Maybe you are looking for