Can anyone suggest how I would go about tidying up the AS below? It’s just to many lines for a relatively simple task!
I tried to use the ‘all page items’ command, but with text frames caught up in the mix, it errors!!!
Thanks in advance.
Jase
tell application "Adobe InDesign CS2"
tell document 1
try
set RGB_ImagesInRectangles to images of rectangles whose space is "RGB"
on error
set RGB_ImagesInRectangles to {}
end try
try
set RGB_ImagesInPolygons to images of polygons whose space is "RGB"
on error
set RGB_ImagesInPolygons to {}
end try
try
set RGB_ImagesInRectanglesInGroups to images of (rectangles of all page items) whose space is "RGB"
on error
set RGB_ImagesInRectanglesInGroups to {}
end try
try
set RGB_ImagesInPolygonsInGroups to images of (polygons of all page items) whose space is "RGB"
on error
set RGB_ImagesInPolygonsInGroups to {}
end try
try
set RGB_EPSsInRectangles to EPSs of rectangles whose space is "RGB"
on error
set RGB_EPSsInRectangles to {}
end try
try
set RGB_EPSSInPolygons to EPSs of polygons whose space is "RGB"
on error
set RGB_EPSSInPolygons to {}
end try
try
set RGB_EPSsInRectanglesInGroups to EPSs of (rectangles of all page items) whose space is "RGB"
on error
set RGB_EPSsInRectanglesInGroups to {}
end try
try
set RGB_EPSsInPolygonsInGroups to EPSs of (polygons of all page items) whose space is "RGB"
on error
set RGB_EPSsInPolygonsInGroups to {}
end try
set AllRGB_Pictures to RGB_ImagesInRectangles & RGB_ImagesInPolygons & RGB_ImagesInRectanglesInGroups & RGB_ImagesInPolygonsInGroups & RGB_EPSsInRectangles & RGB_EPSSInPolygons & RGB_EPSsInRectanglesInGroups & RGB_EPSsInPolygonsInGroups
set QTY_AllRGB_Pictures to count of AllRGB_Pictures
end
end