Skip to main content
Participant
August 5, 2008
Question

listing (for further action) all page items that have a certain script label

  • August 5, 2008
  • 5 replies
  • 484 views
hello from France,

Well the question is essentially in the subject line: how to find and work on all page items of a document (or a page/spread) that have the same script label (or better: whose script label contain the same word)?

I tried some variations around something like that, with no results:
set list_pageitems to every page item of page i whose label is "product"

Any clues?

Thanks for your help
Vincent
This topic has been closed for replies.

5 replies

Inspiring
August 5, 2008
On 5/8/08 11:37 PM, "Vincent Pelletier" <member@adobeforums.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 <sstanley@myriad-com.com.au>
Inspiring
August 5, 2008
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 <sstanley@myriad-com.com.au>
Participant
August 5, 2008
Ralf:
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
Vincent
Participant
August 5, 2008
I found the answer (for those who might be interested), but still have a question (for those who know).

The solution:
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)?

Thanks
Inspiring
August 5, 2008
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.

Ralf