• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ICC Profile Name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ICC Profile Name


  • Subject: Re: ICC Profile Name
  • From: "Fleisher, Ken" <email@hidden>
  • Date: Mon, 11 Jan 2010 11:26:13 -0500
  • Thread-topic: ICC Profile Name

Title: Re: ICC Profile Name
I finally solved my problem by going directly to sips:

tell application "Finder"
   set pr to folder "Profiles" of folder "ColorSync" of folder "Library" of home as alias
end tell


tell application "Adobe Photoshop CS3"
   set printerProfile to choose file with prompt "Select the printer profile for the paper you will be printing on:" default location pr without invisibles, multiple selections allowed and showing package contents
end tell

set printerProfilePOSIX to quoted form of POSIX path of printerProfile
set profileName to do shell script "sips -g description " & printerProfilePOSIX

set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "description: "
set
profileName to last text item of profileName
set AppleScript's text item delimiters to oldDelim

It’s more of a pain that it should be, but at least I finally can get the result...

Ken


On 1/11/10 9:37 AM, "Ken Fleisher" <email@hidden> wrote:

Hello. I am trying to get the name of an ICC profile (the text in the description tag, not the file name). I have tried ColorSyncScripting and Image Events, but I cannot seem to get either to report the internal profile name. Here is what I have tried.

tell application "Finder"
   set pr to folder "Profiles" of folder "ColorSync" of folder "Library" of home as alias
end tell

set printerProfile to (choose file with prompt "Select the printer profile for the paper you will be printing on:" default location pr without invisibles, multiple selections allowed and showing package contents)

tell application "ColorSyncScripting"
   set theProfile to open printerProfile
   name of theProfile
end tell


Unfortunately, I get the following error:

tell application "ColorSyncScripting"
   open alias "MacPro HD:Users:k-fleisher:Library:ColorSync:Profiles:PGPP 4880 (PR-3)_v1.icc"
       "The variable theProfile is not defined."


If I try just getting the name of printerProfile, it just returns the file name, not the text of the description tag. The dictionary entry for “name” says:

profile n : Every profile
elements
contained by application, images.
properties
...
name (text) : the description text of the profile



Can anyone please tell me how to do this?

Thanks in advance!

Ken

--
Kenneth N. Fleisher

Photographer
Imaging & Visual Services
National Gallery of Art
6th Street & Constitution Avenue, N.W.
Washington, D.C.  20565

Phone: (202) 712-7471
email@hidden

Mailing Address:
2000B South Club Drive
Landover, MD  20785

P Please consider the environment before printing this email


_______________________________________________
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


--
Ken Fleisher

Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.

Phone: (202) 712-7471
email@hidden

 _______________________________________________
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

References: 
 >ICC Profile Name (From: "Fleisher, Ken" <email@hidden>)

  • Prev by Date: Thanks for explanation: how?
  • Next by Date: Re: Select folder, make new folder in same directory...
  • Previous by thread: Re: ICC Profile Name
  • Next by thread: Thanks for explanation: how?
  • Index(es):
    • Date
    • Thread