🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15275

Re: Retaining/Inheriting when replacing images - AS

#15275
From: Casey D'Andrea
Date: Tue, 09 Dec 2003 19:38
12 lines
1519 bytes
I just realized something. My current script is setup to fit the image in the frame proportionally. So all I need to do if add an if statement that determines whether or not the frame already contains an image or not. Something like this?

if exists page item 1 of item 1 of selection = true then
    place theFile on myBox
else
    place theFile on myBox
    fit myBox given proportionally
end if

I tried it but it doesn't work. It skips over and runs the else conditions. I have a frame selected that, if it already contains an image, I want to simply place the new image resulting in inherited properties of the original. Otherwise, if the frame is empty it places the image and fits it proportionally.

Any help folks would be great. My alternate is to have 2 separate scripts. Yuck.
Technical Details
Message-ID: <2cce0284.5@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2cce0284.-1@webx.la2eafNXanI> <BBFB920C.39C2%olb@microscript.com> <2cce0284.4@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-12-09 12:08:10 PST
From: "Casey D'Andrea" <kcjones76@cogeco.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Retaining/Inheriting when replacing images - AS
Message-ID: <2cce0284.5@webx.la2eafNXanI>
Date: Tue, 9 Dec 2003 11:38:50 -0800
References: <2cce0284.-1@webx.la2eafNXanI> <BBFB920C.39C2%olb@microscript.com> <2cce0284.4@webx.la2eafNXanI>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit