🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18248

Re: Delete text/runin problem

#18248
From: Kari Puikkonen
Date: Thu, 10 Apr 2003 18:09
31 lines
1533 bytes
People,

Thanks for your advice!

Here is the final script that suits very well for my current purposes (which is comic book lettering, believe or not!).



tell application "InDesign 2.0.2" 
	set theReplaceText to "" 
	set theRuninCharacter to ":" 
	tell parent story of selection 
		repeat with i from 1 to count of paragraphs 
			try 
				set contents of text from character 1 to (character 1 whose contents = ":") of paragraph i to theReplaceText 
			end try 
			repeat 
				set theDeleteCharacter to character 1 of paragraph i 
				if theDeleteCharacter is equal to space then 
					delete character 1 of paragraph i 
				else 
					exit repeat 
				end if 
			end repeat 
		end repeat 
	end tell 
end tell



Kari
Technical Details
Message-ID: <1de8a741.6@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!hammer.uoregon.edu!canoe.uoregon.edu!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de8a741.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,fb1e447d7f4ef9dc
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-04-10 11:38:08 PST
From: "Kari Puikkonen" <kari.puikkonen@welho.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!hammer.uoregon.edu!canoe.uoregon.edu!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Delete text/runin problem
Message-ID: <1de8a741.6@WebX.la2eafNXanI>
Date: Thu, 10 Apr 2003 11:09:56 -0700
References: <1de8a741.-1@WebX.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit