Re: RGB Color Space In InDesign
Re: RGB Color Space In InDesign
- Subject: Re: RGB Color Space In InDesign
- From: "Ripka, Herb" <email@hidden>
- Date: Tue, 4 Dec 2007 11:38:17 -0600
- Thread-topic: RGB Color Space In InDesign
Date: Tue, 4 Dec 2007 04:01:32 -0600
From: "Simon, Garry" <email@hidden>
Subject: RGB Color Space In InDesign
To: <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
Hi, does any one know if it's possible to use a script to find the name
of every image in an InDesign document that uses the RGB color space?
Thanks,
Garry Simon
Gary--
This doesn¹t directly address your question, but ³FileDimensions_TIF.scpt²
(below) works in finding the color space and res of all tiffs within a
folder (and its subfolders).
A question that I have is that sometimes it gets an error saying that
MyColorspace is not defined. Not sure how to fix that one.
³PictureList_TE.scpt² (below ³FileDimensions_TIF.scpt²) generates a list of
pictures used on a Quark document.
--Herbert Ripka
Greendale, WI
³FileDimensions_TIF.scpt² :
set ProcessFolder to (choose folder) as string
set filelist to MakeList(ProcessFolder)
to MakeList(ProcessFolder)
tell application "Finder"
set filelist to (files of entire contents of alias ProcessFolder
whose file type is "TIFF" as list)
return filelist
end tell
end MakeList
to GetDimensions(TheFile)
tell application "Image Events"
launch
set MyImage to open alias TheFile
set MyResolution to resolution of MyImage
set MyDimension to dimensions of MyImage
set MyColorspace to color space of MyImage
set InfoList to name of MyImage & " " & MyResolution & " " &
MyColorspace & " " & (item 1 of MyDimension) / (item 1 of MyResolution) &
" " & (item 2 of MyDimension) / (item 2 of MyResolution) & return
close MyImage
end tell
return InfoList
end GetDimensions
set MyList to ""
repeat with AnItem in filelist as list
set MyList to MyList & (GetDimensions(AnItem as string))
end repeat
tell application "TextEdit"
activate
make new document at beginning with properties {text:MyList as Unicode
text}
end tell
³PictureList_TE.scpt² :
set piclist to ""
set thisline to ""
set filename to ""
tell application "QuarkXPress Passport"
activate
tell document 1
repeat with p from 1 to (count of pages)
tell page p
set m to the name
repeat with i from 1 to (count of picture boxes)
tell picture box i
if not (bounds of image 1) = {0, 0, 0, 0} then
set filevar to file path of image i of it as
text
set filename to my getfileName(filevar)
copy (scale of image 1 of it as list) to {sc1,
sc2}
set thisline to m & " " & filename & " " &
(sc1 as text) & return
set piclist to piclist & thisline
end if
end tell --picture box i
end repeat --picture boxes i
end tell --page
end repeat --pages p
end tell --document
end tell --application
tell application "TextEdit"
make new document at beginning with properties {text:piclist as Unicode
text}
activate
end tell --application
on getfileName(path)
set pathstr to (path as string)
set lastColon to (offset of ":" in (reverse of (characters of pathstr))
as string) of pathstr
return text from -(lastColon - 1) to -1 of pathstr
end getfileName
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden