🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17745

Re: AS Selecting parent paragraph

#17745
From: Roy Marshall
Date: Tue, 13 May 2003 21:47
22 lines
1565 bytes
Hi Dave.

That makes sense, but I get an error"Can't get line -2 of "my paragraph text here" when placed in the script:-
tell application "InDesign 2.0.2"
	activate
	set myselection to selection
	set mypound to search myselection for "�"
	repeat with n from (count of mypound) to 1 by -1
		set mypara to paragraph 1 of item n of mypound
		--if contents of line -1 of mypara contains tab then
		--	exit repeat
		--end if
		set contents of insertion point -1 of line -2 of mypara to return
	end repeat
end tell

Also, I need to add a condition not to place a return if the line contains a tab. This also fails with error "Cant get last line of "My paragraph text here" I have commented it out on the sample.
I am going VERY gray over this!!

Cheers Dave

Roy
Technical Details
Message-ID: <1de91cfb.4@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de91cfb.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,7dfee35d0c727d0
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-13 15:07:40 PST
From: "Roy Marshall" <royston_marshall@hotmail.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: AS Selecting parent paragraph
Message-ID: <1de91cfb.4@WebX.la2eafNXanI>
Date: Tue, 13 May 2003 14:47:13 -0700
References: <1de91cfb.-1@WebX.la2eafNXanI>
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit