🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18602

Re: Searching for text below a specific size

#18602
From: Alan Stearns
Date: Thu, 06 Mar 2003 01:50
23 lines
1720 bytes
Ole,

I think that will find ranges of text with Courier applied that start with a <= 9pt character but which may contain subsequent Courier text that's >9 pt. I'd loop over the text style ranges in myFoundItems:



 
set myItems to {} 
tell application "InDesign 3.0" 
	set find preferences to nothing 
	set myFontName to "Courier" & tab & "Medium" 
	set myFont to font myFontName 
	set myFoundItems to search active document with find attributes {applied font:myFont} 
	repeat with myCounter from 1 to (count myFoundItems) 
		set myItem to item myCounter of myFoundItems 
		repeat with rangeCounter from 1 to (count text style ranges of myItem) 
			if point size of text style range rangeCounter of item myCounter of myFoundItems is less than or equal to 9 then 
				copy object reference of text style range rangeCounter of item myCounter of myFoundItems to end of myItems 
			end if 
		end repeat 
	end repeat 
	myItems 
end tell 
Technical Details
Message-ID: <1de82916.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de82916.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,179c70e89ed74b5b
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-03-05 18:07:37 PST
From: "Alan Stearns" <astearns@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Searching for text below a specific size
Message-ID: <1de82916.2@WebX.la2eafNXanI>
Date: Wed, 5 Mar 2003 17:50:56 -0800
References: <1de82916.-1@WebX.la2eafNXanI>
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit