🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20489

Re: Apply character style to chosen characters? (AS)

#20489
From: Kari Puikkonen
Date: Wed, 03 Jul 2002 22:36
36 lines
1540 bytes
Shane 

That solved it! 

Thank you once again. 

Kari 

(Here is the final script:) 

tell application "InDesign 2.0.1" 

	set find preferences to nothing 
	set change preferences to nothing 

	tell document 1 

		set myFoundItems to {} 
		set myFoundItems to search document 1 with find attributes {find text:"^9"} 

		repeat with myCounter from (count myFoundItems) to 1 by -1 
			set myFoundItem to item myCounter of myFoundItems 
		end repeat 

		set theStyle to character style "Time" 

		tell item 1 of myFoundItems 
			repeat with myCounter from (count myFoundItems) to 1 by -1 
				tell item myCounter of myFoundItems 
					set applied character style to theStyle 
				end tell 
			end repeat 

		end tell 
	end tell 
end tell
Technical Details
Message-ID: <ef97992.1@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef97992.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,e7eb9c0f57bd6ad2,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-07-03 15:39:47 PST
From: "Kari Puikkonen" <kari.puikkonen@welho.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Apply character style to chosen characters? (AS)
Message-ID: <ef97992.1@WebX.aaQKaf7vad4>
Date: Wed, 3 Jul 2002 15:36:59 -0700
References: <ef97992.-1@WebX.aaQKaf7vad4>
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit