Copier le lien dans le Presse-papiers
Copié
What is the easiest way to find an anchored object within the document. I this case I would like to find OB2 (the cyan square ) and hide it.
If you know an easy way of doing this I would be grateful for your help. I am using jsx.
Thank you : )
Geza
Hi,
Try this:
var myItems = app.activeDocument.allPageItems, I = myItems.length;
while (I--) if (myItems.name == "OB2") myItems.visible = false;
(^/)
Copier le lien dans le Presse-papiers
Copié
Hi,
Try this!!
app.activeDocument.layers.itemByName("OB2").visible=false;
Thanks
Copier le lien dans le Presse-papiers
Copié
Hi,
Thank you for this but it only works if the layer is on the very top of the hierarchy.
So in this case
app.activeDocument.layers.itemByName("OB2").visible=false;
Will fail. Because for me app.activeDocument.layers.itemByName("OB2") returns an inValid layer.
This would work
app.activeDocument.layers.itemByName("Layer 1").visible=false;
Because Layer 1 is on the very top.
So is there any way to find the OB1 or OB2. Or maybe I am doing something wrong ? : )
Thank you,
Geza
Copier le lien dans le Presse-papiers
Copié
Hi,
Try this:
var myItems = app.activeDocument.allPageItems, I = myItems.length;
while (I--) if (myItems.name == "OB2") myItems.visible = false;
(^/)
Copier le lien dans le Presse-papiers
Copié
Many Thanks! You saved me a lot of time.
Trouvez plus d’idées, d’événements et de ressources dans la nouvelle communauté Adobe
Explorer maintenant