🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19030

Re: breaking thread

#19030
From: Olav Kvern
Date: Tue, 28 Jan 2003 19:30
42 lines
2532 bytes
DavidT--

Here's an AppleScript version:



--SplitSelectedStory 
--An InDesign 2.0 script 
--Splits the selected story into unlinked text frames (while 
--reataining text frame content). To use this script, select 
--some text or a text frame, then run the script. This script 
--does nothing when you select text in a table cell. 
tell application "InDesign 2.0.1" 
	set myTextObjects to {insertion point, character, word, line, text style range, text, paragraph, text column} 
	set mySelection to selection 
	if (count mySelection) > 0 then 
		get class of item 1 of mySelection 
		if class of item 1 of mySelection is in myTextObjects then 
			--Use the parent story of the first insertion point; selections can span multiple text frames. 
			set myStory to parent story of parent text frame of insertion point 1 of item 1 of mySelection 
			set mySplitStory to true 
		else if class of item 1 of mySelection is text frame then 
			set myStory to parent story of item 1 of mySelection 
			set mySplitStory to true 
		else 
			set mySplitStory to false 
		end if 
		if mySplitStory is true then 
			duplicate text frames of myStory 
			delete text frames of myStory 
		end if 
	end if 
end tell 




Copy this script out of the message, then paste it into the Apple Script Editor. Select a frame in a threaded story, then run the script from the Script Editor. If it works, save it as a compiled script (one of the Script Editor's save options). If you save the compiled script (or an alias to it) in the Scripts folder in your InDesign application folder, you'll be able to run the script from the Scripts palette in InDesign (which is much easier and faster than running the script from the Script Editor or from the Finder).

Thanks,

Ole
Technical Details
Message-ID: <1de79068.4@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de79068.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,b5f8c59feabedf77
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-01-28 11:38:08 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: breaking thread
Message-ID: <1de79068.4@WebX.la2eafNXanI>
Date: Tue, 28 Jan 2003 11:30:01 -0800
References: <1de79068.-1@WebX.la2eafNXanI>
Lines: 48
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit