• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to find list of ICC profiles

Explorer ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

Hello,

 

I'm looking to script a dropdown menu like this one that allows me to convert to the profile selected.

 

Is this possible?

 

Thanks in advance

Screen Shot 2020-05-20 at 8.04.02 AM.png

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

It seems you have already been given the relevant positions. 

https://community.adobe.com/t5/photoshop/access-profile-list-via-script/m-p/11120881?page=1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 20, 2020 May 20, 2020

Copy link to clipboard

Copied

There is no good way to provide the user with a list of profiles.

The only way is the one that r-bin suggested to you in the you last time, however, it has significant drawbacks - a) not all profiles installed in the system are device profiles and may be suitable for color conversions b) you can only assign a profile by its name, however, the profile file name and the internal profile name in most cases are different.
Most likely you need to look for a way to make a list of profiles using a third-party program or script and use this prepared list

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2020 May 24, 2020

Copy link to clipboard

Copied

It would be possible via AppleScript using both InDesign and Photoshop. InDesign documents have a CMYK profile list property, so a Photoshop script could activate ID, make a new document, get all of the available CMYK profiles as a list, and close the temp doc without saving. You might be able to do the same with Javascript via Bridgetalk?

 

 

Here I’m setting a list variable in Photoshop by calling an InDesign function that returns the CMYK list:

 

 

 

tell application "Adobe Photoshop 2020"
	activate
	set myList to my getCMYKList()
(* Returns:
{"Adobe InDesign Default CMYK", "Coated GRACoL 2013", "MooCoated320-2020", "MPDullcoat300-2019", "MPDullcoat300-2019v2", "MPDullcoat350-2016 Neutral", "MPDullcoat350-2019", "MPNews280-2016v5", "MPUncoated300-2015", "MPUncoated330-2015", "U.S. Sheetfed Coated v2", "U.S. Sheetfed Uncoated v2", "Uncoated GRACoL 2013", "Coated FOGRA27 (ISO 12647-2:2004)", "Coated FOGRA39 (ISO 12647-2:2004)", "Coated GRACoL 2006 (ISO 12647-2:2004)", "Euroscale Coated v2", "Euroscale Uncoated v2", "Frontlit Mylar", "Generic CMYK Profile", "IDGrayscale15", "IDGrayscale20", "IDGrayscale25", "IDGrayscale30", "ISO Coated v2 300% (ECI)", "ISO Newspaper v4 26 (basICColor)", "Japan Color 2001 Coated", "Japan Color 2001 Uncoated", "Japan Color 2002 Newspaper", "Japan Color 2003 Web Coated", "Japan Color 2011 Coated", "Japan Web Coated (Ad)", "MaxBlack", "MooCardsLabels", "Photoshop 4 Default CMYK", "Photoshop 5 Default CMYK", "PSO Coated v3", "PSO Uncoated v3 (FOGRA52)", "Slickrock Pearl 2016", "U.S. Web Coated (SWOP) v2", "U.S. Web Uncoated v2", "Uncoated FOGRA29 (ISO 12647-2:2004)", "Uncoated_Fogra47L_VIGC_300.icc", "US Newsprint (SNAP 2007)", "VistaPrint Uncoated 300", "VistaPrint Uncoated Neutral", "WAN-IFRAnewspaper26v5", "Web Coated FOGRA28 (ISO 12647-2:2004)", "Web Coated SWOP 2006 Grade 3 Paper", "Web Coated SWOP 2006 Grade 5 Paper"}*)	

end tell



--get all available CMYK profiles from InDesign as a list
on getCMYKList()
	tell application "Adobe InDesign 2020"
		set t to make new document
		set cmyklist to CMYK profile list of t
		close t saving no
		return cmyklist
	end tell
end getCMYKList

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2020 May 24, 2020

Copy link to clipboard

Copied

LATEST

I’m guessing you want to construct your dialog in Photoshop, but here‘s an example with a dropdown list dialog constructed in InDesign and passing the result over to Photoshop:

 

tell application "Adobe InDesign 2020"
	set t to make new document
	set cmyklist to CMYK profile list of t
	close t saving no
	set myLabelWidth to 250
	set myDialog to make dialog with properties {name:"Choose a CMYK Profile"}
	tell myDialog
		tell (make dialog column)
			tell (make border panel)
				tell (make dialog column)
					tell (make dialog row)
						
						make static text with properties {static label:"CMYK Profiles:"}
						set cmykprof to make dropdown with properties {string list:cmyklist, selected index:0, min width:myLabelWidth}
					end tell
				end tell
			end tell
		end tell
	end tell
	
	--get the results
	set myResult to show myDialog
	if myResult = true then
		
		---the selected cmyk profile
		set cmykname to item ((selected index of cmykprof) + 1) of cmyklist as item
		
	else
		return
	end if
	destroy myDialog
	
end tell

tell application "Adobe Photoshop 2020"
	activate
	tell current document
		convert to profile cmykname intent perceptual with dithering and blackpoint compensation
	end tell
end tell

 

 

Screen Shot 23.png

 

 

The active document convertedScreen Shot 24.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines