Copy link to clipboard
Copied
Goodmorning everyone,
having no experience with scripts, I apologize for perhaps stupid questions but I can't do the most trivial things:
to find all the anchored objects I made this script:
var story = app.selection [0] .parentStory;
var anchoredItems = story.pageItems.everyItem (). getElements ();
for (var n = 0; n <anchoredItems.length; n ++) {
........................
......................
};
but I could not understand how to do, if I select only a few lines of text, to find only the anchored objects related to the selection?
Thanks for your help
ivan
Copy link to clipboard
Copied
Hi Ivan,
Find Anchored objects (reference point& position) script
Thanks,
Prabu G
Copy link to clipboard
Copied
thank you for your suggestion
I also found inspiration for other problems
thank you
regards
ivan
Copy link to clipboard
Copied
This link is not working. https://forums.adobe.com/message/8635101
Could it be shared as text message?
Copy link to clipboard
Copied
// When text is selected:
var anchoredItems = app.selection[0].allPageItems;
Loop the result array.
That will even catch items in selected text that contains a table with graphic cells or anchored items in text cells.
Regards,
Uwe Laubender
( ACP )