Thread View: adobe.scripting.indesign
2 messages
2 total messages
Started by Justin_Monsees
Sun, 01 Feb 2009 06:19
Grep with Stories
Author: Justin_Monsees
Date: Sun, 01 Feb 2009 06:19
Date: Sun, 01 Feb 2009 06:19
5 lines
848 bytes
848 bytes
I am currently trying to use the GREP feature using JS for Indesign. I got it working at the document level but I want to be able to search and replace things at the textFrame level. Looking at the interface, after you select a textFrame, you can set the "Search" option to "Story." How do I code this. Thanks, Justin M.
Re: Grep with Stories
Author: Kasyan_Servetsky
Date: Sun, 01 Feb 2009 07:20
Date: Sun, 01 Feb 2009 07:20
14 lines
1066 bytes
1066 bytes
Assuming that a text frame is selected: var myTextFrame = app.selection[0]; var myStory = myTextFrame.parentStory; app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = "(?i)[A-Z]*?@[A-Z]*?[.]..."; app.changeGrepPreferences.underline = true; myStory.changeGrep(); app.findGrepPreferences = app.changeGrepPreferences = null; You can search and replace in a story: myStory.changeGrep(); and in a text frame: myTextFrame.changeGrep();
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