Help with converting Freehand 7 files to AI CS2 please


I am just starting to use AppleScript in my work and would like to know if there’s a script for opening hundreds of Freehand 7 files (clip art) and saving them as Illustrator CS2 docs. Completely unattended if possible ie. I only need to run the script and the Mac does the rest.

Found a script here, not sure how to modify it (its for FH10 to CS3). Also the author says it saves the new file in the same location as the original. I would prefer to have them saved in a different location. If not possible, I could live with them being saved to the same folder.

Thanks :slight_smile:

That was mine. Here’s the newer version:
I don’t think there’s any way to control where Freehand saves the file - the applescript support in Freehand is pretty terrible (and FH7 is probably worse!) - but good luck.

This only works about half the time - sometimes it gives a Type 2 error, for unknown reasons. (When was the last time you had a type 2 error?)

set the file_list to {}
set the rawName to ""
set the epsName to ""
tell application "Finder"
	set convertThese to selection
	repeat with convertMe in convertThese
		if kind of convertMe is "DataTypeIPTC" or kind of convertMe is "DataTypeAGD4" or kind of convertMe is "DataTypeAGD3" then
			set thePath to (container of convertMe) as string
			tell application "FreeHand 10"
				open convertMe
				tell document 1 of it
					set the epsName to name of it
					save it as MacEPS
					close it
				end tell
				set the file_list to the file_list & (thePath & epsName & ".eps")
			end tell
		end if
	end repeat
end tell

repeat with openMe in file_list
	tell application "Adobe Illustrator"
		open alias openMe
		tell document 1
			save it in (thePath as alias) as Illustrator
			close it
		end tell
	end tell
end repeat

Great thanks. I am using FH10 but the files to be converted are FH7.

I will try out your script and see how it goes. Cheers

I guess you may have resolved your problem already
but if you haven’t then heres how to convert freehand to illustrator
and save to a different location of your choice.
this is a freehand mx script but you can just recompile it as freehand 10 theres no difference.

on open freehand_files
	set myfilepath to choose folder
	repeat with i in freehand_files
		tell application "FreeHand MX"
			open i
			set thename to name of document i
			set FilePath to myfilepath & thename & ".ai" as string
			save in file FilePath as AI11
		end tell
	end repeat
end open

save as an application then drop some freehand files on it

Thanks pidge1 I will give it a try. :slight_smile:

Alas, it doesn’t work on my system with Freehand 10. I get a “type 2 error”.

Does Freehand MX have better applescript support than FH10? Because the applescript dictionary in FH10 really bites.


I’m not sure what a type 2 error is, i just assumed applescript functionality in Mx and 10 would
be the same.
i don’t think we have freehand 10 kicking about for me to test!!
but i can’t see why this script couldn’t be altered slightly to do the same in 10.
all the save features in the freehand dictionary have been in most versions as far as i’m aware.

try some different variations in this line:

save in file FilePath as AI11

i went with “AI11” but this might not be right. albeit it worked.