>At 7:17 am -0800 03/04/02, Andrew O. Mellinger wrote: >>I would suggest using Mac::Glue to open each file in Appleworks and > >do a save as. Let Appleworks works do the work for you. > >2] AppleWorks can translate the .cwd files, but it's a carbon app and >therefor doesn't have a classic Mac res fork, meaning MacGlue can't >get at it's applescript dictionary which will be in a ._res file >somewhere.
You might be able to trick it by converting the resource in the bundle to a resouce frok and dropping it on the droplet to get it to make the glue. But that is a hack. Using Perl under OSX I'd suggest generating little Applescripts to temp files and then calling "osascript" to execute them. I've used this method with great success. I just played with AppleWorks 6 (Carbonized) and had some interesting results. I used the following script: tell application "AppleWorks 6" activate open file "Macintosh HD:Desktop Folder:junk.cwk" save as file type "TEXT" in "Macintosh HD:Desktop Folder:more_junk.text" end tell It saved the file as HTML, which is easier to strip, and you'd save some of the formatting. What the Perl would look like (note, I haven't check the syntax on this, but I've done stuff like it before so I know the theory works): ------- my $src = "Macintosh HD:Desktop Folder:junk.cwk" my$dst = "Macintosh HD:Desktop Folder:more_junk.txt" open (TEMP, ">temp.osa") print TEMP <<SCRIPT; tell application "AppleWorks 6" activate open file "$src" save as file type "TEXT" in "$dst" end tell SCRIPT system("osascript temp.osa"); ------ -Andrew --