Indesign Spot Color Problem

I’m having a problem with creating a spot color in Indesgn CS2. My script works makes a spot color names it correctly, but when it tries to set my text fill color to the new spot color it crashes out Indesign. After a lot of trial an error I figured this to be the problem. I can open a file from recovery and try to set the text to the spot color and it crashes again. Any help on this?

Here is the script…


tell application "Finder"
	set SaveFolder to choose folder name with prompt "Select Folder to Save Impo Files"
	------------------------------------------------------
	set product_number to text returned of (display dialog "Enter the Product Code Number" default answer "0000") as string
	set product_1 to characters 1 thru 2 of product_number as text
	set product_2 to characters 3 thru 4 of product_number as text
	------------------------------------------------------
	set inset_number to text returned of (display dialog "Enter the Inset Number" default answer "000") as string
	set SpotColor to characters 2 thru 3 of inset_number as text
	------------------------------------------------------
	set win_size to button returned of (display dialog "Choose the Win Size" buttons {"Large", "Small", "Seal"} default button "Small")
	if win_size is "Large" then
		set win_size to "93"
	end if
	if win_size is "Small" then
		set win_size to "92"
	end if
	if win_size is "Seal" then
		set win_size to "94"
	end if
	------------------------------------------------------
	set ImpoFolder to make new folder in SaveFolder with properties {name:inset_number}
	------------------------------------------------------
end tell

----------------------Create Form File--------------------------------

tell application "Adobe InDesign CS2"
	activate
	set FormDoc to make document
	tell document preferences of FormDoc
		set page width to "8.5 in"
		set page height to "11 in"
	end tell
	tell FormDoc
		try
			set LayerName to layer "Image layer" of FormDoc
		on error
			set LayerName to make layer with properties {visible:true, locked:false, name:inset_number}
			delete layer 2
		end try
		set NewSpotColor to make color with properties {space:CMYK, color value:{0, 0, 0, 100}, name:SpotColor}
		set properties of NewSpotColor to {model:spot}
		delete color "C=100 M=0 Y=0 K=0"
		delete color "C=0 M=0 Y=100 K=0"
		delete color "C=0 M=100 Y=0 K=0"
		delete color "C=15 M=100 Y=100 K=0"
		delete color "C=75 M=5 Y=100 K=0"
		delete color "C=100 M=90 Y=10 K=0"
		
		set WinFormFrame to make text frame
		set the geometric bounds of WinFormFrame to {"10.8438 in", "0 in", "11 in", "1.5 in"}
		set contents of WinFormFrame to "WIN FORM #" & inset_number
		set vertical justification of text frame preferences to bottom align
		set justification of characters of WinFormFrame to left align
		set applied font of characters of WinFormFrame to "Helvetica (TT)"
		set font style of characters of WinFormFrame to "Bold"
		set point size of characters of WinFormFrame to 12
		set fill color of characters of WinFormFrame to NewSpotColor
		set overprint fill of characters of WinFormFrame to true
		set vertical justification of text frame preferences of WinFormFrame to bottom align
		
		set save_name to "FORM " & inset_number as string
		set dest_path to SaveFolder & inset_number & ":" as string
		set FileName to dest_path & save_name
		save to FileName
	end tell
	close active document
end tell


I don’t use Indesgn, fishheadtw, so apologies if this is a red herring. What happens if you try replacing the above with this syntax?

set NewSpotColor to make color with properties {space:CMYK, model:spot, color value:{0, 0, 0, 100}, name:SpotColor}

In InDesign CS this works for me:

tell application "InDesign CS"
	tell document 1 to make new color with properties {space:CMYK, color value:{100, 0, 50, 0.0}, name:"script Color Swatch2"}
end tell

and This works:

tell application "InDesign CS"
	tell document 1 to make new color with properties {model:spot, space:CMYK, color value:{50.0, 0.0, 100.0, 0.0}, name:"script Color Swatch"}
end tell

since you are going to make a spot color it might be easier to do it in one line of code. But then again, after changing the helvetica to T1, your script runs fine on my computer as well. If I recall you were having problems with saving this script, you might try it on another Mac.

Thanks you for the help everyone, but my problem still exist. I can run this on several other macs all different speeds and models and it works fine. I try it on my mac and it crashes Indesign. I take the spot color command out and it works. I replace the spot command to set the color to “Regristration” and it works fine. I have tried add in some delays to slow it down thinking it was a speed issue, but no luck. It is driving me crazy cause I need to run this on my machine. I’m thinking about reinstalling Indesign to see if this helps. In the meantime if anyone has any thoughts or a similiar situation that can shed some light on this it would be greatly appreciated.

Thanks again

Check this out I started checking what the settings on the computers are that the script works on, compared to mine. I found that if version cue is turned off it does not work. I turn my version que back on and it works fine. What going on with that?

fishheadtw