Copy link to clipboard
Copied
where error
var doc = app.activeDocument;
var page = app.activeWindow.activePage;
var layer = doc.layers.item("Layer 1");
for(var i = 0; i < page.allPageItems.length; ++i) {
var a = page.allPageItems;
if(a instanceof TextFrame && a.itemLayer == layer) {
a.override(page.masterPageItems);
}
}
Copy link to clipboard
Copied
useful thread...
Copy link to clipboard
Copied
Hi,
And this:
http://www.jongware.com/idjshelp.html
useful as well.
Look into Object Model. Method pageItem.override(page) is assigned to masterSpread pageItems - not to any from doc.
(Overrides a master page item and places the item on the document page as a new object.)
So iterate through page.appliedMaster.allPageItems and override them to page.
Jarek
Copy link to clipboard
Copied
I just want to act on the active page but this error (page don't object)
var doc = app.activeDocument;
var page = app.activeWindow.activePage;
var katman = doc.layers.item("Layer 1");
var myItems = page.appliedMaster.allPageItems;
for(var y=0;y<myItems.length;y++){
if(myItems
try{myItems
catch(e){alert("error")}
}
}
Copy link to clipboard
Copied
hamdifem napisał(-a)
...error (page don't object)
...
Could you paste exact error text?
Does your masterSpread contain more than 1 page (pageItems are left/right located)?
Jarek
Copy link to clipboard
Copied
Yes for using overflow on page and The object on the left appears to the right
In new document script worked
overflow in page Is there a solution