This content has been marked as final. Show 5 replies
Your script snippet is correct (assuming page i does refer to some page). You can use "contains" instead of "is" and you get every page item with the word "product" in the label.
I found the answer (for those who might be interested), but still have a question (for those who know).
set list_pageitems to page item "product" of page i
If you want to do it for a whose document (in may case, deleting some page items):
delete page item "product" of document 1
Strange syntax but it works :-)
The remaining question:
How to find page items whose label contains a certain string: it would be like selecting page items by tags (every word of the script label would be considered as a tag)?
Indeed my first snippet worked now I don't know why it didn't worked the first times? As i have experimented to some extent, some previous combinations must have not worked, but i thought i have tried the one i posted Well i may be tired ;-)
So ok it works on a page, on a document and on specific word if wanted (with "contains"), and with a better syntax (the code is much logical with the "every" word in it i think) than the example that i found in the indesign AS manual.
Thanks a lot
You want something like:<br /><br /> set theitems to every item of all page items of page x whose label contains<br />"something"<br /><br />-- <br />Shane Stanley <firstname.lastname@example.org>
On 5/8/08 11:37 PM, "Vincent Pelletier" <email@example.com> wrote:<br /><br />> Indeed my first snippet worked now I don't know why it didn't worked the<br />> first times?<br /><br />Perhaps because it ignores items that are not directly on the page (such as<br />grouped items). That's where the "all page items" method still works.<br /><br />-- <br />Shane Stanley <firstname.lastname@example.org>