EPS to AI Convert to Outlines, Any way to make this script run faster?

I have a Illustrator CS3 script that I wrote a year or two ago. A few of my users report it runs slow, I never noticed :stuck_out_tongue:

Does anyone have any advice on speeding this one up a bit? I tried an alternate method of running a batch process in ActionScript, but it fails in the oddest way…


set FileSample to (choose folder with prompt "Choose an input folder.") as string

set MyFolderA to (choose folder with prompt "Choose an output folder.") as string


tell application "Finder" to set theFiles to files of folder FileSample whose name extension is in {"eps"} or kind contains "EPS"

repeat with oneFile in theFiles
	tell application "Adobe Illustrator"
		activate
		
		open (oneFile as alias) without dialogs
		
		tell front document
			
			set docBaseName to name
			
			if (characters -4 thru -1 of docBaseName) as string is ".eps" then
				set docBaseName to (characters 1 thru -5 of docBaseName) as string
			end if
			
			set newFileName to (MyFolderA & docBaseName & ".ai") as string
			
			
			try
				set locked of every layer to false
			end try
			
			try
				set locked of every page item to false
			end try
			
			
			set theTexts to every text frame
			set selection to theTexts
			convert to paths (every text frame)
			
		end tell
		
		save front document in file newFileName as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 11, compressed:true, embed ICC profile:false, embed linked files:true, font subset threshold:100.0, PDF compatible:true}
		close front document saving no
		
	end tell
end repeat

tell application "Adobe Illustrator"
	activate
	display dialog "Done." buttons {"OK"} default button 1
end tell

Model: PPC G5
Browser: Firefox 3.6.3
Operating System: Mac OS X (10.4)

It’s a little more unreliable, but you could try GUI scripting to select all, press command-A then create outlines, press command-shift-O.
I have some Illy scripts and their speed depends on the complexity of the drawing. More paths = slower.

Hi,

may be disabling the preview mode after opening will make it a bit faster …

		set preview of every layer to false

you could also try to minimize the document window while running the script, so there will probably be no redrawing …