我想在我的文档中标记特定的内联图像,但我却停留在实际的标记部分。我已经拥有的是以下内容:
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 ...
}
有人可以引导我使用正确的语法来用标签(在本例中为“图像”)封装数组中找到的每个对象吗?
提前致谢 !