I'd like to tag specific inline images in my document but am a but stuck on the actual tagging part. What I already have is the following :
var myDoc = app.activeDocument;
var myItems = myDoc.allPageItems;
var foundInlineImages = Array();
// loop through the page and find all inline objects (images).
// Name has to be Rectangle to exclude grouped objects.
for(var i = 0, len = myItems.length; i < len; i++)
{
if( (myItems[i].constructor.name=="Rectangle") && (myItems[i].parent instanceof Character) )
{
foundInlineImages.push(myItems[i]);
}
}
// encapsulate all array entries with [Image] tag
for(var i = 0; i < foundInlineImages.length; i++)
{
// I need here something like foundInlineImages[i].changeTextPreferences.markupTag="Image";
// unfortunatly this doesn't work ...
}
Can somebody lead me to the right syntax to encapsulate each found object in my array with a tag (in this case 'image') ?
Thanks in advance !