🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8218

Re: JS: script poster

#8218
From: Peter_Kahrel
Date: Tue, 24 Oct 2006 16:54
29 lines
1626 bytes
Well, I'm stumped. I had that script working fine, but trying it out a few times now shows the same behaviour with the quotes. Can't work that one out. But doing a find/change on the quotes after pasting deals with that. I added a line to sort out the ampersands as well.

Peter



with( app.documents.add() ) 
   { 
   textPreferences.typographersQuotes = false; 
   with( app.activeDocument.textFrames.add() ) 
      { 
      geometricBounds = [0,0,'700pt','500pt']; 
      insertionPoints[0].select(); 
      } 
   } 
app.paste(); 
app.findPreferences = app.changePreferences = null; 
with( app.activeDocument.stories[0] ) 
   { 
   search( '&', false, false, '&' ); 
   search( '<', false, false, '&lt;' ); 
   search( '^t', false, false, '&nbsp;&nbsp;&nbsp;' ); 
   search( '^[', false, false, "'" ); 
   search( '^]', false, false, "'" ); 
   search( '^}', false, false, '"' ); 
   search( '^{', false, false, '"' ); 
   insertionPoints[0].contents = '<pre>'; 
   insertionPoints[-1].contents = '</pre>'; 
   }
Technical Details
Message-ID: <3bc170eb.4@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.isoc.lu!news.stben.net!webcrossing
References: <3bc170eb.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,8c86002f143ea828
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Peter_Kahrel@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: Re: JS: script poster
Message-ID: <3bc170eb.4@webcrossing.la2eafNXanI>
Date: Tue, 24 Oct 2006 09:54:17 -0700
References: <3bc170eb.-1@webcrossing.la2eafNXanI>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news.isoc.lu!news.stben.net!webcrossing