Article View: adobe.scripting.indesign
Article #20144Re: Skip Images or replace image content while keeping file name
From: Bill Clements
Date: Thu, 17 Oct 2002 17:07
Date: Thu, 17 Oct 2002 17:07
37 lines
2057 bytes
2057 bytes
Hi Ole,
I think I've got it.
For Each myFile In myFolder.Files
Rem Process only JPG and TIF files.
If (InStr(myFile.Name, ".JPG") <> 0) Or (InStr(myFile.Name, ".jpg") <> 0) Then
myCollection.Add Array(myFile.Path, myFile.Name, myPageCounter, myImageBoundsArray(myFrameCounter - 1), myTextFrameBoundsArray(myFrameCounter - 1))
'-----------(1)-----------
If (InStrRev(myFile.Name, "_1") <> 0 Then
myFramesPerPage = myPSet(myNumberOfPSets)
myFrameCounter = myFrameCounter + 1
'-----------(2)-----------
Else
If myFrameCounter < myFramesPerPage Then
myFrameCounter = myFrameCounter + 1
'-----------(3)-----------
Else
If myFramesPerPage = myPSet(myNumberOfPSets) Then
myFramesPerPage = 4
myFrameCounter = 1
myPSet(myNumberOfPSets) = myPSet(myNumberOfPSets - 1)
myPageCounter = myPageCounter + 1
End If
'-----------(4)-------------
myFrameCounter = 1
myPageCounter = myPageCounter + 1
End If
End If
Next
So for P sets (6, 5, 4, 3, 2, 1) from the above example, where PSet(6)=3, PSet(5)=3, PSet(4)=3, PSet(3)=3, PSet(2)=2 and PSet(1)=3, the sequnce is (1), (2), (3) for each P set, and (2), (2), (2), (4) for the F sets.
Thanks,
Bill
Technical Details
Message-ID:
<1de60ecc.13@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de60ecc.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,dfb25085c0b7ec89 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-10-21 03:59:48 PST From: "Bill Clements" <clementsbill@hotmail.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Skip Images or replace image content while keeping file name Message-ID: <1de60ecc.13@WebX.la2eafNXanI> Date: Thu, 17 Oct 2002 10:07:14 -0700 References: <1de60ecc.-1@WebX.la2eafNXanI> Lines: 42 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit