🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19390

Re: Changing text kerning

#19390
From: Rich Carroll
Date: Mon, 16 Dec 2002 22:37
26 lines
2013 bytes
I added an option for users who don't have a pair selected, but just have the insertion point inbetween the characters. This seems to work very nicely. I hope this helps someone else as well.

tell application "InDesign 2.0.2"
	try
		set myText to item 1 of selection
		set kerningValue to kerning value of myText
		set charContents to characters (theIndex - 1) thru theIndex of parent story of myText
		set theIndex to index of myText
	on error
		set myText to object reference of item 1 of selection
		set kerningValue to kerning value of myText
		set charContents to contents of myText
		set theIndex to index of myText
	end try
	set charFontStyle to font style of myText
	set CharFontSize to point size of myText
	set charFont to applied font of myText
	set find preferences to nothing
	set change preferences to nothing
	set myFoundItems to search document 1 for charContents with find attributes {applied font:charFont, point size:CharFontSize, font style:charFontStyle} with case sensitive
	repeat with myFoundItem in myFoundItems
		set properties of character 1 of myFoundItem to {kerning value:kerningValue}
	end repeat
end tell

Thanks for the help.
Technical Details
Message-ID: <1de70063.5@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de70063.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,3bc2053af32b20a2
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-16 15:08:06 PST
From: "Rich Carroll" <carrollr@cappsdigital.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news.maxwell.syr.edu!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: Changing text kerning
Message-ID: <1de70063.5@WebX.la2eafNXanI>
Date: Mon, 16 Dec 2002 14:37:27 -0800
References: <1de70063.-1@WebX.la2eafNXanI>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit