🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17371

Re: Reset transforms to 100%

#17371
From: Shane Stanley
Date: Fri, 13 Jun 2003 22:25
41 lines
2439 bytes
Thanks Ole -- in combining Rob Day's improvements to the original, I accidentally left out the line of his script that set the value of thePercent.

Let's try it again:



 
tell application "InDesign 2.0.2" 
	set myFrame to item 1 of selection 
	if class of myFrame is not in {group, table} then 
		set theProps to properties of myFrame 
		set thePercent to vertical scale of theProps 
		if page item 1 of myFrame exists then 
			try 
				set myVScale to absolute vertical scale of myPic 
				set myHScale to absolute horizontal scale of myPic 
				set picBounds to geometric bounds of myPic 
			end try 
		end if 
		--Beware line breaks: Following line should start with "set theProps" and ends with "& theProps"  
		set theProps to {absolute vertical scale:nothing, vertical scale:100, absolute horizontal scale:nothing, horizontal scale:100, stroke weight:thePercent * (stroke weight of myprops) / 100, corner radius:thePercent * (corner radius of theProps) / 100} & theProps 
		set properties of myFrame to theProps 
		try 
			--Beware line breaks: Following line should start with "set" and ends with "picBounds}"  
			set properties of page item 1 of myFrame to {absolute vertical scale:thePercent * myVScale / 100, absolute horizontal scale:thePercent * myHScale / 100, geometric bounds:picBounds} 
		end try 
	else if class of myFrame is group then 
		transform group contents myFrame 
		set textFrames to text frames of (get all page items of myFrame) 
		repeat with aFrame in textFrames 
			scale text attributes aFrame 
		end repeat 
	end if 
end tell 




Phew...

Shane
Technical Details
Message-ID: <1de9579c.27@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de9579c.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,3645d1b4a9bc81d1
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-13 15:37:54 PST
From: "Shane Stanley" <sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Reset transforms to 100%
Message-ID: <1de9579c.27@WebX.la2eafNXanI>
Date: Fri, 13 Jun 2003 15:25:53 -0700
References: <1de9579c.-1@WebX.la2eafNXanI>
Lines: 46
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit