Illustrator CS - matte always reverts to black on export

HI all-

I’ve been working on several AppleScripts lately that open EPS files in Illustrator CS (originally created in Illustrator 8 and 9) and exports them to GIF format. When I open the files individually and launch the export manually, everything is great. But as soon as I run the script, the matte [background] color goes black on everything. I’ve tried setting the default fill and stroke to white, and still no luck. Is this a bug? I’ve seen several posts about this elsewhere on the web (for both AppleScript and JavaScript), but no solutions. Here’s what the basic export portion of the script looks like:

          tell application "Illustrator CS"
					activate
					set user interaction level to never interact
					open file path_var
					
					--	Perform the GIF Export
					export current document to file path_var as GIF with options ¬
						{class:GIF export options ¬
							, matte color:{red:255, green:255, blue:255} ¬
							, matte:true ¬
							, color count:256 ¬
							, color reduction:adaptive ¬
							, information loss:0 ¬
							, color dither:none ¬
							, dither percent:0 ¬
							, web snap:0 ¬
							, transparency:false ¬
							, interlaced:false ¬
							, horizontal scaling:100.0 ¬
							, vertical scaling:100.0 ¬
							, antialiasing:true ¬
							, artboard clipping:false ¬
							, saving as HTML:false}
					close current document saving no
				end tell

I have to assume this is an issue with inherited properties, but I’m at a loss for what is actually going on. :?
Thanks for any help!

-M

Easy! :slight_smile:



         ....
         , dither percent:0 ¬ 
         , web snap:0 ¬ 
         , transparency:true ¬ <---- you forgot this !!!!!
         , interlaced:false ¬ 
         , horizontal scaling:100.0 ¬ 
         ....

I tested with the following code and it works.

tell application "Illustrator CS"
	activate
	set user interaction level to never interact
	set path_var to "Macintosh HD:Users:vml:Desktop:ladybug.ai"
	open file path_var
	
	--   Perform the GIF Export 
	export current document to file path_var as GIF with options ¬
		{class:GIF export options ¬
			, matte color:{red:255, green:255, blue:255} ¬
			, matte:true ¬
			, color count:256 ¬
			, color reduction:adaptive ¬
			, information loss:0 ¬
			, color dither:none ¬
			, dither percent:0 ¬
			, web snap:0 ¬
			, transparency:true ¬
			, interlaced:false ¬
			, horizontal scaling:100.0 ¬
			, vertical scaling:100.0 ¬
			, antialiasing:true ¬
			, artboard clipping:false ¬
			, saving as HTML:false}
	close current document saving yes
end tell

Unfortunately that isn’t working either- my GIFs still end up with a black background. (And I don’t want the image to be transparent, I want it to have a white background). This must have something to do with the settings on the EPS files because when I open the “Save for Web” dialog, the matte is automatically set to black.