🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20224

[AS] How can I make my script shorter ?

#20224
From: Olivier Berquin
Date: Thu, 17 Oct 2002 10:17
86 lines
2471 bytes
Hello, 

My english is a little poor, but I thing this is clear... no, I "hope" this is clear ;-) 

I would like to know if a text frame have a text wrap different to "none". 
I wrote this line: 

	set myTextWrap to text wrap of the properties of myTextFrame



After that, I made a test: 

	if myTextWrap is not "none" then ...



Perfect ! Just what I want. 

Here is my script:

 
-- 
tell application "InDesign 2.0.1" 
	set theTextFrames to object reference of every text frame of active document 
	repeat with myTextFrame in theTextFrames 
		set myTextWrap to text wrap of the properties of myTextFrame 
		if myTextWrap is not "none" then 
			beep 
		end if 
	end repeat 
end tell 
--



After, I should be able to make only one command of these two lines: 

-- 
tell application "InDesign 2.0.1" 
	set theTextFrames to object reference of every text frame of active document 
	repeat with myTextFrame in theTextFrames 
		if (text wrap of (the properties of (myTextFrame))) is not "none" then 
			beep 
		end if 
	end repeat 
end tell 
--



No chance... Even if I remove (part of) the brackets. 

How can I "put" these two lines into only one ? 

	set myTextWrap to text wrap of the properties of myTextFrame 
	if myTextWrap is not "none" then... 





In the same idea, what's the better way: 

 
tell application "InDesign 2.0.1" 
	set myDocument to active document 
	set myName to name of myDocument 
	set myPages to pages of myDocument 
end tell 


or : 

 
tell application "InDesign 2.0.1" 
	set myName to name of active document 
	set myPages to pages of active document 
end tell 




TIA 

Olivier.
Technical Details
Message-ID: <1de632fc.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.rt.ru!rt.ru!image.surnet.ru!surnet.ru!newsfeed.freenet.de!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,d81de8ac449c1341,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-10-21 03:57:44 PST
From: "Olivier Berquin" <ob@microscript.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.rt.ru!rt.ru!image.surnet.ru!surnet.ru!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: [AS] How can I make my script shorter ?
Message-ID: <1de632fc.-1@WebX.la2eafNXanI>
Date: Thu, 17 Oct 2002 03:17:20 -0700
Lines: 70
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit