InDesign CS4 change pantone 2655C to process

I know this is simple but I can’t make it to work. I just want to change spot Pantone 2655 to process with the following values 0,0,0,100

tell application "Adobe InDesign CS4"
   tell document 1
       if exists spot "PANTONE 2555 C" then
           set SpotColor to spot "PANTONE 2655 C" to make color with properties {space:CMYK, model:process, color value:{0, 0, 0, 100}}
else
           display dialog "PMS 2555 was changed to process" giving up after 2
       end if
   end tell
end tell

Any hints to help me to figure it out this are really appreciated. I would like to know what part of my code is failing.

ThankU!

I just want change only PMS 2555C. I would to keep the remaining spot colors as is

Try this

tell application "Adobe InDesign CS4"
	set myFiles to active document
	tell myFiles
		set theListOfColors to (every swatch whose model is not CMYK and name is "YOUR SWATCH")
		set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}}
	end tell
	display dialog "Your PANTONE as been converted"
end tell

Using sbriss script and CS3, this works for me


tell application "Adobe InDesign CS3"
	--tell application "Adobe InDesign CS4"
	set myFiles to active document
	tell myFiles
		try
			set theListOfColors to (every swatch whose model is spot and name is "PANTONE 2655 C")
			set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}} --custom mix, tints values do not change (50%=50% of new s/m)
			display dialog "PMS 2555 was changed to process" giving up after 2
		on error
			display dialog "PMS 2555 was not found" giving up after 2
		end try
	end tell
end tell

I was close but not enough to make it work. ThankU tbryne and sbriss for your help

Man this is difficult so I need your help. I already spent almost 2 days to trying making this to work. This what I have so far but I know this time I’m not even close to make this work.

This time using the same code I need to run as droplet (application) when U drop files into it, or double clicking will ask you to choose a folder with ID files.

(*
-- instruct if double clicked

on run
   tell application "Finder"
       display dialog "Please drop InDesign  files onto droplet icon."
   end tell
end run
*)



set source_folder to choose folder with prompt "Select folder containing Indesign Documents"
tell application "Finder" to set item_list to every item of source_folder
repeat with this_item in item_list
	set doc_kind to kind of (info for this_item as alias)
	
	
	if doc_kind contains "InDesign" then
		tell application "Adobe InDesign CS4"
			open this_item
			tell document 1
				try
					set theListOfColors to (every swatch whose model is spot and name is "PANTONE 2655 CV")
					set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}} --custom mix, tints values do not change (50%=50% of new s/m)
					
				on error
					display dialog "PANTONE 2655 CV was not found or was converted to process" buttons {"OK"} default button 1 with icon caution
					--giving up after 3
				end try
				
				
				close saving yes --> or yes depending on personal preference
			end tell
		end tell
	end if
end repeat

Never mind. After taking lunch & rest my brain for a couple of days i was able to figure it out how to convert the script onto a droplet. Thanks again to tbryne and sbriss :slight_smile:

Any suggestions are welcome if you see anything that needs to be changed

-- instruct if double clicked
on run
	tell application "Finder"
		display dialog "Please drop InDesign files onto the droplet icon to convert PANTONE 2655 CV to 100% process."
	end tell
end run
on open this_item
	set source_folder to choose folder with prompt "Select folder containing Indesign Documents"
	tell application "Finder" to set item_list to every item of source_folder
	repeat with this_item in item_list
		set doc_kind to kind of (info for this_item as alias)
		
		
		if doc_kind contains "InDesign" then
			tell application "Adobe InDesign CS4"
				open this_item
				tell document 1
					try
						-->If PMS 2655 if found, convert, save and close
						set theListOfColors to (every swatch whose model is spot and name is "PANTONE 2655 CV")
						set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}} --custom mix
						close saving yes
					on error {}
						close saving no
					end try
				end tell
			end tell
		end if
	end repeat
end open

nellbern,

I added a few things that I see when dealing with InDesign files from customers.

I made the script work with folders and files that are dropped.

I added a longer user info dialog for those who double click the icon.

I added other examples of things I need to fix from time to time (there are still colors like Custom Color, Match Blue, and the like, that people add without thinking of the final product).

I added a color code (by changing the label color) for those files that were not re-saved, because I have to check to see why the color was not changed, note the other colors above that people add.

And, I added a “Done!” dialog, because I am impatient and want to know when it finishes without watching it.

There is probably a quicker way.


-- instruct if double clicked
on run
	tell application "Finder"
		display dialog "This is a Droplet. Please drop a Folder or Files onto the Droplet icon to convert InDesign files with PANTONE 2655 to Black." & return & return & "            (Tints will stay tints of Black)."
	end tell
end run
on open source_folder
	try
		tell application "Finder"
			set this_item to files of folder source_folder
		end tell
	on error
		set this_item to source_folder
	end try
	repeat with this_item in this_item
		set SaveCode to 0 -- control for changing label color. if no changes this number will not change.
		set doc_kind to kind of (info for this_item as alias)
		
		if doc_kind contains "InDesign" then
			tell application "Adobe InDesign CS3"
				open this_item
				tell active document
					
					-->If Spot Colors Starting with PANTONE 2655 (EX. includes any form of it: CV, C, U, Copy, etc) is found, convert to K
					try
						set theListOfColors to (every swatch whose model is spot and name begins with "PANTONE 2655")
						set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}}
						set SaveCode to 1
					end try
					
					-- Some customers shorten the name, deactivate if unwanted
					-->If Spot Color Starts with PMS2655 (EX. same as above and PMS2655-1, etc) is found, convert to K
					try
						set theListOfColors to (every swatch whose model is spot and name begins with "PMS2655")
						set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}}
						set SaveCode to 1
					end try
					
					-- Some customers screen mix colors, not understanding spots and figure you will fixed any problems, deactivate if unwanted
					-->If Screen Mix Color Starts with PANTONE 2655 is found, convert to K
					try
						set theListOfColors to (every swatch whose model is process and name begins with "PANTONE 2655")
						set properties of item 1 of theListOfColors to {model:process, space:CMYK, color value:{0, 0, 0, 100}}
						set SaveCode to 1
					end try
					
					if SaveCode = 0 then -- if document is unchanged, close and no save.
						close saving no
						--If you want a quick visual of which files were not changed, deactivate if unwanted
						tell application "Finder"
							set label index of this_item to 2
						end tell
					else
						close saving yes -- if SaveCode was changed from 0 to 1, close AND save
					end if
				end tell
			end tell
		end if
	end repeat
	tell me to activate --activate the script to bring it to the front
	
	display dialog "Done!"
end open

Hope that helps.

Brian