Copy link to clipboard
Copied
Hi everyone,
Please can someone helpo me...
I have a grep find set up in a script and all works fine.
Just wondered if it's possible to get the page number of each instance returned by the grep find?
Thanks in advance.
Grep find typically returns a Text object. From there, you can get myFind.parentTextFrames[0].parentPage. Note that if the item is on the pasteboard, parentPage is null. Or if it extends across multiple text frames those frames might be on different pages.
Copy link to clipboard
Copied
Grep find typically returns a Text object. From there, you can get myFind.parentTextFrames[0].parentPage. Note that if the item is on the pasteboard, parentPage is null. Or if it extends across multiple text frames those frames might be on different pages.
Copy link to clipboard
Copied
Hi Brian,
Thanks for the help, I'll give that a go 👍
Copy link to clipboard
Copied
For an example implementation of what @brian_p_dts described, see this post (search for "function textPage").
- Mark
Copy link to clipboard
Copied
Hi Mark,
Thanks for the help, the linked discussion looks good 👍