ChangeFont in Freehand MX

Any Freehand scripters out there? I’m trying to create my first Freehand script, which needs to search a document and change all occurences of the “Times-Roman” font to “Helvetica.”

tell application "FreeHand MX"
	ChangeFont OldFont "Times-Roman" NewFont "Helvetica" Search document
end tell

This script does nothing, and doesn’t give an error, so I don’t know why it doesn’t work. I’m not familiar with the proper syntax, I guess. Any help is appreciated, thanks. 8)

You code works fine here if I change font names to match my own fonts:

tell application "FreeHand MX"
	ChangeFont OldFont "Times New Roman" NewFont "Helvetica" Search document
end tell

Are you sure you are searching the propper font? Eg:
“Times -Roman”
“Times- Roman”
“Times-Roman "
" Times-Roman”
“Times Roman”
Some time ago, not necessary in FreeHand, working with fonts was very ugly, since some times you needed the “postscript name” of the font, instead of the “display name”. But my current tests in a FreeHand MX document work all fine with the names you see in the font menu…

Hey, thanks jj. It was the name of the font that got me. I assumed I needed the postscript name, but I just needed to say “Times.”


I’m doing the same thing, but instead i’m setting applscript to make a new text frame with contents in it:

set mytext to make new text frame with properties {contents: “Test only”}

the text frame willl be created in illustrator but I don’t have any idea how to change the formatting of the text to use Helvetica instead of the default font in Illustrator.

I’ve tried this:

set the text font of character style “Big Red” of document 1 to {name:“Helvetica”, family: “Helvetica”,style:“Medium”}

but nothing happens…

Any ideas? (This is Illustrator CS) By the way…

Thanks so much!!!