🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18028

(AS) Removing Content from selected groups

#18028
From: Eric Tucker
Date: Tue, 06 May 2003 15:04
32 lines
1928 bytes
I have a script that removes the contents of labeled text boxes on the
page:

tell application "InDesign 2.0.2"
		set myTextItems to all page items of active document
		repeat with aFrame in myTextItems
				copy aFrame to theFrame
				-- check only text frames
		if the class of theFrame is equal to text frame then
						-- see if the frame is on the page, not on the pasteboard
			repeat until {page, spread} contains the class of theFrame
				set theFrame to the parent of theFrame
			end repeat
						-- it is on the page, clear it
			if the class of theFrame = page and label of aFrame is "text_copy"
then
				set text contents of aFrame to ""
			end if
					end if
			end repeat
end tell

What I want is a script that does the same thing but to a series of
selected grouped items.
I tried changing 
		set myTextItems to all page items of active document          to
		set myTextItems to all page items of selection

but it would only work if I had only one grouped item selected and it
would do nothing if I had selected 2 or more grouped items.

I am new to applescript and completely lost.
Technical Details
Message-ID: <b8c5cd58.0305060704.503cca4e@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,8cd1210b96bb4459,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-06 08:04:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: tuckereric@attbi.com (Eric Tucker)
Newsgroups: adobe.scripting.indesign
Subject: (AS) Removing Content from selected groups
Date: 6 May 2003 08:04:35 -0700
Organization: http://groups.google.com/
Lines: 32
Message-ID: <b8c5cd58.0305060704.503cca4e@posting.google.com>
NNTP-Posting-Host: 64.122.103.57
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1052233475 10746 127.0.0.1 (6 May 2003 15:04:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 6 May 2003 15:04:35 GMT