|
After much testing, writing, screaming and retesting I've finally
built this very handy AppleScript for you FreeHand users for
converting old FreeHand documents into the FreeHand 8-10 format. Below
is the downloadable script in a Stuffit archive.
Simply drag the old native FreeHand files
(see warning below) 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 save the files adding the .FH8 .FH9, or .FH10 extension.
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 extension.
|
WARNING
|
|
FeeHand 9 will not open
v2 or v3 FreeHand files at this time. If you must convert to
FH 9, I hope you kept FH 8 around. Convert those files with
the FH 8 script first, then use the FH 9 script on those files.
A lot of work... I know. Get a wish to the FreeHand team to
change this:
wish-freehand@macromedia.com
|
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!
Version History
-
v2.1
- Added the new script for FreeHand 10 conversion.
-
v2.0 - Fixed the FH 8 script
so it will properly convert FH v2 and v3 files without that beep.
OOPS! heh heh. The FreeHand 9 script will now give a warning message
if you drag a v2 or v3 file on it. See warning above.
-
v1.5 - Added the new script
for FreeHand 9 conversion. Updated both scripts to give an error
if Navigation Services is not detected. Added some script that will
truncate potentially long file names.
-
v1.1
- Added some code that checks for valid FreeHand formats. If it
encounters a non-valid fomat (TIF, JPG etc.), it will beep and continue
the process. Thanks to Anton Futselaar for this info.
-
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 saveas8files(currentfile, originFolder)
tell application "FreeHand 8.0.1b"
set fileExtension to {"FH8"}
set newName to (currentfile as string) & "." & fileExtension
open currentfile without Dialogs
save last document as "DataTypeAGD3" in file newName
close
end tell
tell application "Finder"
move currentfile to originFolder
end tell
end saveas8files
|
As you can see the "Mystery"
behind the FreeHand 8 format is called "DataTypeAGD3"
for FreeHand 9 its "DataTypeAGD4".
This is currently hidden from AppleScript via the FreeHand scripting
dictionary so it was nearly impossible for someone to create this script
without this information.
-
The first part of the script takes
the currentfile name and converts it to a new name by adding the
".FH8" 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 FreeHand
8 files is because this will help with linking problems later
when you open the newly converted FreeHand 8 files. You can
save or delete the moved originals if you prefer.
|