Thread View: adobe.scripting.indesign
4 messages
4 total messages
Started by andrea_laue
Tue, 20 Jan 2009 20:05
master pages and grep in CS3
Author: andrea_laue
Date: Tue, 20 Jan 2009 20:05
Date: Tue, 20 Jan 2009 20:05
14 lines
1231 bytes
1231 bytes
Hello, I'm wondering if I'm missing some nuance to handling master pages in searches. I do *not* want the master pages searched, so I set this property: app.findChangeGrepOptions.includeMasterPages = false; But I'm still getting results from the master pages. To be precise, sometimes I get results, and sometimes I don't. That is, I have two layouts with master pages. For one the master pages are getting searched; for the other, they aren't. How much nuance is there in the defining of the master pages? Could that be the problem? Or do I need to do something else in my script? Thanks, Andrea
Re: master pages and grep in CS3
Author: Dave_Saunders
Date: Tue, 20 Jan 2009 20:08
Date: Tue, 20 Jan 2009 20:08
3 lines
791 bytes
791 bytes
You've shown us one line only of your script. Are you sure that it is always executed before you do your search? Are you sure that at some other point in your script you don't switch that option back on? Dave
Re: master pages and grep in CS3
Author: andrea_laue
Date: Tue, 20 Jan 2009 22:03
Date: Tue, 20 Jan 2009 22:03
16 lines
1843 bytes
1843 bytes
Hi Dave, Thanks for your quick reply. Actually, I think I've figured out the problem. And it isn't exactly as I posted it... The script cycles through each paragraph in the active document for which nested styles are defined. It returns an alert when the search string (a nested style delimiter) is *not* found in a given paragraph. I'm getting this alert for paragraphs in the master spread. Essentially, since my Grep preferences say don't search master spreads, then the search operation will never find the search string in the master spread paragraphs, right? So I'll get the alert every time. Does this seem like the proper interpretation of what's going on? So, perhaps what I need to do is test that the current paragraph is not in a master spread before triggering the alert. Or, better yet, test at the beginning whether the parent of a given story is a master spread before I even bother to search it. Looking at the object model, it's not immediately clear how to do this. Can one test if the parent of a given story is a master spread? (I see from previous posts that this would likely happen via the frames and pages axes, but I'm not able to make it happen...) Thanks again, Andrea
Re: master pages and grep in CS3
Author: Dave_Saunders
Date: Tue, 20 Jan 2009 22:21
Date: Tue, 20 Jan 2009 22:21
7 lines
869 bytes
869 bytes
If you use the function in this thread: <http://www.adobeforums.com/webx?128@@.59b77ee3> to find the page, you can then check to see if the parent of the page is a Spread or a MasterSpread. Dave
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads