0
我想在文檔中標記特定的內嵌圖像,但是我只是卡在實際的標記部分。我已經有了如下:如何標記特定圖像?
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 ...
}
有人可以使我正確的語法封裝在我的陣列中的每個找到的對象與(在這種情況下,「圖像」)標籤?
在此先感謝!