Copy link to clipboard
Copied
Hi experts
I am trying to match inline object in the paragraph, below is my screen
How i can match the inline object every character gives
---------------------------
Script Alert
---------------------------
[object Character]
---------------------------
OK
---------------------------
how can i find object in the character?
thanks in advance
regards
a r u l
paragraph.pageItems gives you a collection of all anchored/inline objects in a paragraph. Loop through them to find the one you need.
Harbs
Copy link to clipboard
Copied
paragraph.pageItems gives you a collection of all anchored/inline objects in a paragraph. Loop through them to find the one you need.
Harbs
Copy link to clipboard
Copied
Hey!
This will collect all Inline objects:
var myDoc = app.activeDocument;
var myItems = app.activeDocument.allPageItems;
var foundObjects = Array();
for(var i = 0; i < myItems.length; i++){
if(myItems.parent instanceof Character){foundObjects.push(myItems);}
}
Hope that helps.
--
tomaxxi
http://indisnip.wordpress.com/
Copy link to clipboard
Copied
If you want all inlines in the doc, this is the quickest way to get it in an array:
app.documents[0].stories.everyItem().pageItems.everyItem().getElements();
Harbs
Copy link to clipboard
Copied
Hi Harbs and Marijan Tompa
thanks a lot for your msgs.
Copy link to clipboard
Copied
Yes Harbs. I messed it up!
Still learning
--
tomaxxi
Find more inspiration, events, and resources on the new Adobe Community
Explore Now