🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8493

Re: Resizing All the Graphics CS2

#8493
From: Rothrock-
Date: Thu, 05 Oct 2006 23:05
20 lines
2399 bytes
The basics seem to work mostly fine, but there is something completely wonky with the way the script is deciding which images to optimize. I don't know applescript very well so I can't figure out what is going on.

I'm getting an array or collection (or whatever it is called in Applescript) of all the linked images.

set IDLinks to every link whose status is normal
--Iterate backwards through the links to avoid invalidating objects.
repeat with myCounter from (count IDLinks) to 1 by -1
set myLink to item myCounter of IDLinks

I'm able to count through and indeed I get 7 for the 7 linked images in my test file. But then sometimes it will seem to skip an image.

Sometimes it will do rotated images, sometimes it won't. Sometimes it won't do an image that had been rotated in the past but isn't any more.

Sometimes it will just seem to not do an image unless I remove the frame and relink it. Relinking along isn't enough.

I don't know enough AS to really figure out how to fix the problem. Most of the time variables aren't of a type I know how to do anything with. So I'm always getting messages like: "Can't resolve Vintage5.jpg to string." Of course the error dialog seems to have no problem resolving the name of the link to a string, but it stops the script and I can't go any further.

The thread where I found this <http://bbs.applescript.net/viewtopic.php?pid=47980> hasn't had any action for awhile. And there is mention of the pseudo-random skipping of some links, but no answer.

I search these forums on resize and optimize and didn't find anything. Can you point me to any other samples? Thanks.
Technical Details
Message-ID: <3bc1e021.4@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed.kamp.net!newsfeed.kamp.net!news.germany.com!news.datemas.de!news.albasani.net!news.isoc.lu!webcrossing
References: <3bc1e021.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,6bab0eaf4a581070
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Rothrock-@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed.kamp.net!newsfeed.kamp.net!news.germany.com!news.datemas.de!news.albasani.net!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Resizing All the Graphics CS2
Message-ID: <3bc1e021.4@webcrossing.la2eafNXanI>
Date: Thu, 5 Oct 2006 16:05:29 -0700
References: <3bc1e021.-1@webcrossing.la2eafNXanI>
Lines: 34
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit