Exporting FreeHand files to PhotoShop EPS files

This AppleScript will convert FreeHand files to either PhotoShop 4 RGB EPS files (FreeHand™ 7) or PhotoShop 4/5 RGB EPS files (FreeHand™ 8). Below is the solution I came up with using AppleScript.

Version: 7-9 (Mac)

 
 


I basically took the Export FH files to EPS files script and rewrote certain parts of it for exporting to PhotoShop EPS files. Below is the downloadable script in a Stuffit archive.

Script Download

Macintosh Stuffit File

exporfhfilestopseps.sit

Within this archive are three scripts. They are for FreeHand 7, FreeHand 8 or FreeHand 9 depending on what version you wish to work with.

Simply drag the native FreeHand 7, 8 or 9 files on to the script and it will first ask you where to save the original files (This can be the same folder the files come from if you prefer). Then it will launch FreeHand, open the files and export the files adding a .PS_EPS extension (You can remove the "PS_" part later for cross compatibility with Windows). You don't even have to sit there and watch it.

For now it only works if you drop just files, not a folder with files. See more below in Expanding the Script. The script will automatically truncate names that appear to be too long (over the 31 character limit), when adding the ".XXXXXX" extension.


Expanding the Script

Here are some other options I'd like to add to this script:

  • I've been struggling with being able to drop a folder containing FreeHand files on to the script and getting it to work properly. For some reason it skips files, and if there is another folder already in the folder I drop, it fails. If anyone can give me some tips on this it would be great!

  • Would like it to consolidate all scripts into one. So it will detect what version of FreeHand you have installed. If you don't have FreeHand 7 but drop a FreeHand 7 file onto the script, it will open FreeHand 8 instead then export the file. Right now, the beta script I have will just give an error if it can't find either. Help me please on this. Thanks!


Version History

  • v1.5 - Updated both scripts to give an error if Navigation Services is not detected. Added some script that will truncate potentially long file names. Added a script for FreeHand 9.

  • v1.0 - Initial release.

If anyone out there can help out just send some info via the FeedBack page.


About the Script

You can edit this script yourself with the Script Editor that is free from Apple and is usually installed with the System software. Below is a piece of the driving force behind the exporting script.

on exportfh7files(currentfile, originFolder)
 tell application "FreeHand 7.0.2"
  set fileExtension to {"PS_EPS"}
  set newName to (currentfile as string) & "." & fileExtension
  open currentfile without Dialogs
  save last document as "DataTypePhotoshop4RGB" in file newName
  close
 end tell
 tell application "Finder"
  move currentfile to originFolder
 end tell
end exportfh7files

As you can see I used the export fomat "DataTypePhotoshop4RGB". This appears in quotes as it is a newer format supported by FreeHand.

  • The first part of the script takes the currentfile name and converts it to a new name by adding the ".PS_EPS" extension. This new name is applied when FreeHand saves the file.

  • I chose to add to the line "open currentfile without Dialogs" so it suppresses any warning dialogs that may come up during the opening process that may ask for missing fonts or links. The reason I chose to add this is because I didn't want it to stop in the middle while I was off, just because one file was missing a link but the others were fine. This is something you can find out for yourself later.

  • The reason why I have the script ask where to save the original files rather that where to save the EPS files is because I couldn't get FreeHand to work with the "choose folder" function in AppleScript. So for now, it moves the original files to a folder that you specify (By the way it gives me Type 1 errors in the script if I had the user pick where to save the EPS files, if you can give any help it would be appreciated).