🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1588

Re: Grep with Stories

#1588
From: Kasyan_Servetsky
Date: Sun, 01 Feb 2009 07:20
14 lines
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();
Technical Details
Message-ID: <59b7bf6c.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b7bf6c.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ca69b41cf4795b5b
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Kasyan_Servetsky@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Grep with Stories
Message-ID: <59b7bf6c.0@webcrossing.la2eafNXanI>
Date: Sat, 31 Jan 2009 23:20:17 -0800
References: <59b7bf6c.-1@webcrossing.la2eafNXanI>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit