🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18718

How can I change the tool in the UI [AS]?

#18718
From: Olivier Berquin
Date: Tue, 25 Feb 2003 13:30
22 lines
1393 bytes
Hi,

I've this script:

tell document 1 of application "InDesign 2.0.2"
	activate
	set theSelection to selection
	set theClass to class of item 1 of theSelection
	if theClass is in {oval, rectangle, polygon} then
		set theTarget to theSelection
	else if theClass is in {PDF, EPS, image} then
		set theTarget to parent of theSelection
	end if
end tell

When the "direct tool selection" is selected, I've an error on the line: "set theTarget to parent of theSelection".
Two solutions: 1) anybody know the correct syntax to avoid this problem?
2) How can I change the tool (direct tool selection -> tool selection) ?

TIA.

Olivier.
Technical Details
Message-ID: <1de803ec.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!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,f3eb1f4e74209329,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-02-25 05:37:35 PST
From: "Olivier Berquin" <olb@microscript.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: How can I change the tool in the UI [AS]?
Message-ID: <1de803ec.-1@WebX.la2eafNXanI>
Date: Tue, 25 Feb 2003 05:30:38 -0800
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit