🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1662

Re: Script Poster

#1662
From: Peter Kahrel
Date: Mon, 02 Feb 2009 14:34
28 lines
1329 bytes
I've pruned that script down to this:



#target indesign; 
tf = app.documents.add().textFrames.add ({geometricBounds: [0,0,'700pt','500pt']}); 
tf.insertionPoints[0].select(); 
app.activeDocument.textPreferences.typographersQuotes = false; 
app.paste(); 
app.findGrepPreferences = app.changeGrepPreferences = null; 
replace ('&', '&'); 
replace ('<', '&lt;'); 
replace ('\\t', '&nbsp;&nbsp;&nbsp;'); 
replace ("'", "'"); 
replace ('"', '"'); 
tf.parentStory.insertionPoints[0].contents = '<pre>'; 
tf.parentStory.insertionPoints[-1].contents = '</pre>';

function replace (f, r) 
   { 
   app.findGrepPreferences.findWhat = f; 
   app.changeGrepPreferences.changeTo = r; 
   app.activeDocument.changeGrep () 
   }



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

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,b01c2efbaa957bf8
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Kahrel" <kahrel@kahrel.plus.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Script Poster
Message-ID: <59b7c17d.1@webcrossing.la2eafNXanI>
Date: Mon, 2 Feb 2009 06:34:52 -0800
References: <59b7c17d.-1@webcrossing.la2eafNXanI>
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit