🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19356

Re: Help to convert VB Script to AppleScript

#19356
From: Richard Ronnback
Date: Tue, 07 Jan 2003 05:39
22 lines
1662 bytes
Hmm... For me own use I wrote a script that used search and replace (formatting only) to remove local overrides, as this is how I have always done it through the UI.

As I'm still learning scripting, I'm trying to understand out what the benefits are for each approach (i.e. Shane's way of applying the style vs search and replace with the style)

I'm probably missing something essential and I would appreciate if anyone cared to explain what it is <g>

Here's the script:



 
tell application "InDesign 2.0.1" 
	set myDoc to active document 
	set myPara to paragraph styles of myDoc

	repeat with anItem in myPara 
		set properties of find preferences to {applied paragraph style:anItem} 
		set properties of change preferences to {applied paragraph style:anItem} 
		search selection for "" replacing with "" 
	end repeat

end tell 
Technical Details
Message-ID: <1de74010.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de74010.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,5bdb0e6d7a11cf45
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-01-06 22:08:20 PST
From: "Richard Ronnback" <richard.ronnback@telia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Help to convert VB Script to AppleScript
Message-ID: <1de74010.2@WebX.la2eafNXanI>
Date: Mon, 6 Jan 2003 21:39:10 -0800
References: <1de74010.-1@WebX.la2eafNXanI>
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit