Article View: adobe.scripting.indesign
Article #15972Re: Retaining/Inheriting when replacing images - AS
From: Casey D'Andrea
Date: Mon, 27 Oct 2003 22:12
Date: Mon, 27 Oct 2003 22:12
30 lines
1757 bytes
1757 bytes
Care to elaborate :-)
The section of my script:
-- Use the selected picture boxes and create new ones after that.
tell application "InDesign 2.0.2"
tell myDocument
if i ? ItemCount then
if (count mySelection) > 0 and class of item i of mySelection is in myTextObjects then
set myBox to item i of mySelection
try
place theFile on myBox with properties theFile
fit myBox given proportionally
on error
activate
end try
else
set newRectangle to make rectangle with properties {geometric bounds:{imageTop, imageLeft, imageTop + 100, imageLeft + 100}}
place theFile on newRectangle
fit newRectangle given proportionally
end if
activate
else
set newRectangle to make rectangle with properties {geometric bounds:{imageTop, imageLeft, imageTop + 100, imageLeft + 100}}
place theFile on newRectangle
fit newRectangle given proportionally
activate
end if
end tell
end tell
Technical Details
Message-ID:
<2cce0284.1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cce0284.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,f8f302a73e62fbf5 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-27 14:38:00 PST From: "Casey D'Andrea" <kcjones76@cogeco.ca> Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Retaining/Inheriting when replacing images - AS Message-ID: <2cce0284.1@webx.la2eafNXanI> Date: Mon, 27 Oct 2003 14:12:29 -0800 References: <2cce0284.-1@webx.la2eafNXanI> Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit