Illustrator CS5--how to stop "Swatch Conflict" dialog box

I have a script that copies a vector graphic from one page to another. The problem is, during the copy process, I get that “Swatch Conflict” dialog box.

Is there a way to either kill that “Swatch Conflict” dialog box altogether, or can I somehow tell Illustrator to merge swatches without asking?

I have tried using system events to deal with the dialog box, to no avail. I can see the buttons being pushed, etc., but nothing happens…

Do you have.

tell application "Adobe Illustrator"
	set user interaction level to never interact
end tell

In your script?

no, I’ll give it a shot.

is that a global command? Does it reset in the next tell box, or do I have to tell it to go back to allowing user interaction?

actually, I answered my own question. You have to turn it back on…

is it possible to turn user interaction off and then on again in the same script?

It’s an app property so you can store it, set it put back etc. There are some dialogs that handle differently thou. with Adobe apps but worth a test anyhows.

I’ve forgotten about this, and came up with a workaround.

Since I’m copying to a pre-made template for use with film separations, I had wanted to have some spot colors in there that would automatically change tint. But, since that “Swatch Conflict” dialog box was being so troublesome, it occurred to me that the best thing would be to simply re-color the existing spot colors. To wit:


set thisDoc to current document
	tell thisDoc
		try
			set properties of spot "HL White" to {name:"HL White", color:{class:CMYK color info, cyan:40, magenta:0.0, yellow:0.0, black:0.0}, color type:spot color, spot kind:spot cmyk color}
			set properties of spot "UL White" to {name:"UL White", color:{class:CMYK color info, cyan:0, magenta:40, yellow:0.0, black:0.0}, color type:spot color, spot kind:spot cmyk color}
			set properties of spot "Black CV" to {name:"Black CV", color:{class:CMYK color info, cyan:0, magenta:0, yellow:0.0, black:100}, color type:spot color, spot kind:spot cmyk color}
		end try
	end tell

anyway, thanks for your help. Cheers :slight_smile: