🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17251

AS- Line count

#17251
From: Roy Marshall
Date: Fri, 20 Jun 2003 13:47
28 lines
1416 bytes
Can someone please tell me where I am going wrong here. I need to establish whether a paragrph (that contains a character @) is greater than 2 lines long.
This script errors

tell application "InDesign 2.0.2"
	activate
	set myselection to selection

	set myreturn to search myselection for "@"
	repeat with n from (count of myreturn) to 1 by -1
		set myStory to parent story of item n of myreturn
		set myIndex to index of item n of myreturn
		set mypara to paragraph 1 of character myIndex of myStory
		if (count of lines of mypara) is greater than 2 then
			display dialog "There are more than 2 lines"
		end if



	end repeat

	display dialog "End"
end tell

Any help (as always) would be good!

Cheers

Roy
Technical Details
Message-ID: <1de99dcb.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,c7404195a0418f36,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-20 07:08:36 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!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: AS- Line count
Message-ID: <1de99dcb.-1@WebX.la2eafNXanI>
Date: Fri, 20 Jun 2003 06:47:11 -0700
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit