Every so often, someone writes in to the Macintosh Manager's mail list, saying "I have a client who keeps [phone numbers, contact information, whatever] in a hypercard stack. I want to bring them up to date by giving them [a palm pilot, a pager, whatever]. How can I get all that information out of HyperCard easily?"
If you know HyperTalk and have the full retail version of HyperCard, you wouldn't even bother to ask. But most Managers don't want to learn HyperTalk or buy the retail version of HyperCard. I, on the other hand, have fun creating little utilities, so over the Lincoln's Birthday long weekend (2000) I wrote this pair of AppleScripts to export data from text fields into a text file.
Since then, I had reports that some people have hit various out-of-memory problems. I rewrote the scripts in Hypercard, and saved them as
a stand-alone application. THAT ought to fix the problems. I hope.
So which should you use? The Applescripts or the HyperCard version?
Personally, I think the Applescript version is easier to use.
You'll need the HyperCard player (version 2.2 or later, as that's when HyperCard became AppleScriptable). Drop your stack on the first AppleScript, and it'll put all the data in text fields into a text file. Each field's text will be separated by a TAB character; each card's text will be separated by a return. If by chance a field already has a tab or return or a line feed in it, the script will substitute the strings <TAB>, <CR>, or <LF>, respectively. The second script is there in case the file you have is really a Standalone HyperCard stack--but you won't need it unless the first script says to try it.
OLDER: Download the free (but copyright 2001 / 2002 Robert Howe) HyperCard to Text File AppleScripts version 1.0.1; they're a binhexed Compact Pro self-extracting archive.
NEWER: Still, if you hit the out-of-memory problem as well, then give the Hypercard version a try. Download the free (but copyright 2003 Robert Howe) Export Stack Data 1.1.0 Standalone HyperCard application; it's a binhexed Compact Pro self-extracting archive. It comes with an Applescript droplet you might need: Change to HyperCard Stack, to be used with extreme caution as there's no undo available.
No luck with either of these? Write to me. I'm not fast in coming up with a solution, but I'll eventually get to it.
|