🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #426

Re: Clear text overrides in applescriot for Indesign CS3 on Mac OSX 10.5.6

#426
From: Tynan
Date: Tue, 24 Mar 2009 12:54
40 lines
2240 bytes
hi, raw newbie on applescript but I'm trying to set an applescript that will search for various text attributes and apply various existing character styles in Indesign CS3

So far so good except the text override(s) remain in place, if I apply the same character style in Indesign the overrides are cleared

Is there some sort of option etc that I can add to my script that will clear any overides as the character style is applied?

script code below, thank-you
.....

tell application "Adobe InDesign CS3"
	activate
	tell parent story of item 1 of selection

		--find/change text preferences
		tell application "Adobe InDesign CS3"

			--Search for the string "Text"
			set properties of find text preferences to {font style:"Italic"}
			set properties of change text preferences to {applied character style:"Italic CH"}

			--FIND/CHANGE OPTIONS
			set case sensitive of find change text options to false
			set include footnotes of find change text options to true
			set include hidden layers of find change text options to false
			set include locked layers for find of find change text options to false
			set include locked stories for find of find change text options to false
			set whole word of find change text options to false

			set properties of find text preferences to {font style:nothing}
			set properties of change text preferences to {font style:nothing}



			--DO IT
			try
				tell parent story of item 1 of selection to change text
			end try
		end tell
	end tell
end tell
Technical Details
Message-ID: <59b86485.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
References: <59b86485.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,eb2cfe05176434d3
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Tynan@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Clear text overrides in applescriot for
 Indesign CS3 on Mac OSX 10.5.6
Message-ID: <59b86485.0@webcrossing.la2eafNXanI>
Date: Tue, 24 Mar 2009 05:54:27 -0700
References: <59b86485.-1@webcrossing.la2eafNXanI>
Lines: 46
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit