Hunderds of BMP-grayscale images in a document. Every image needs to be filled proportionally in frame. Also several tiff BW-images that should not be touched.
tell application "Adobe InDesign CS3"
set myDoc to active document
set myLinks to links in myDoc
repeat with n from (count myLinks) to 1 by -1
set myLink to item n of myLinks
set myImage to parent of myLink
if link type of myLink is "Windows Bitmap" then
if space of myImage is "Grayscale" then
fit myImage given proportionally
Thanks for your code, works perfectly.
I had problems with this parent thing (parent of myLink), i seem to allways reference actual link and not parent...