🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1622

Place Images

#1622
From: MarkPeterson
Date: Thu, 29 Jan 2009 15:35
18 lines
1386 bytes
(CS3) I'm attempting to modify the ImageCatalog script. The purpose of following script is to place the four images contained in the "image2" folder in four text frames (one text frame per page) in a four-page document. Nothing happens when the script runs.

//Import image files
var myFolder = File("c:\\junk\\junk2\\image2");
var myDocument = app.activeDocument;
var myFiles = new Array;
myFiles = myFolder.getFiles("*");

for (var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++){ myFiles.push([myFileCounter]); }

//Place image files
//Number of frames

var myNumberOfFrames = "4";

for (var myCounter = 0; myCounter < myNumberOfFrames; myCounter++){ var myFile = myFiles[myCounter]; var myRectangle = myDocument.rectangles.item(myCounter); myRectangle.place(File(myFile)); }

What am I doing wrong?
Technical Details
Message-ID: <59b7b911.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,2803cbcac5a99090,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: MarkPeterson@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Place Images
Message-ID: <59b7b911.-1@webcrossing.la2eafNXanI>
Date: Thu, 29 Jan 2009 07:35:54 -0800
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit