🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2564

Re: Apply a noBreak with javascript

#2564
From: Peter Kahrel
Date: Wed, 10 Dec 2008 23:43
12 lines
1264 bytes
Thanks for your kind words. As to your script, you were caught up in big changes between CS2 and CS3/4. Your approach (approaching InDesign stories as text) was going the CS2 way, which was the only way to go because CS2 did not know GREP natively. But CS3 and CS4 do know GREP natively, which make many things a lot easier. What you want to do ca\n be scripted in CS3 as follows:

app.findGrepPreferences = app.changeGrepPreferences = null; 
app.findGrepPreferences.findWhat = "� [\\d.,]+"; 
app.changeGrepPreferences.noBreak = true; 
app.activeDocument.changeGrep();



The O'Reilly titles aren't clear on this -- yet. They soon will be.

Peter
Technical Details
Message-ID: <59b73c29.2@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b73c29.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,6abd8a76c8452b2c
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
From: "Peter Kahrel" <kahrel@kahrel.plus.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Apply a noBreak with javascript
Message-ID: <59b73c29.2@webcrossing.la2eafNXanI>
Date: Wed, 10 Dec 2008 15:43:30 -0800
References: <59b73c29.-1@webcrossing.la2eafNXanI>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit