[comp.sys.mac.hypercard] Can't read card or bg id

janette@athena.mit.edu (Janette H. Lee) (11/10/90)

I've got a stack that will open to the first card, but then display a message
saying "Can't read card or bg id".  I cannot do anything except click ok,
which takes me to the home card.  All I've got is text in the stack.  Is the
info lost forever or is there some way I can import this data to a text file
without opening the stack?  All the books that I can get my hands on don't
help a bit.  Any help is appreciated.

Janette Lee
janette@athena.mit.edu

bc@Apple.COM (bill coderre) (11/12/90)

Janette Lee:
|I've got a stack that will open to the first card, but then display a message
|saying "Can't read card or bg id".  I cannot do anything except click ok,
|which takes me to the home card.  All I've got is text in the stack.  Is the
|info lost forever or is there some way I can import this data to a text file
|without opening the stack?  All the books that I can get my hands on don't
|help a bit.  Any help is appreciated.

You can get some to all of the SCRIPTS back with Recovery Method A:
1. Make a copy of the stack. Work with the copy ONLY.
2. Using Resedit or Disktop or some other scary file editor, change the
   "File Type" from "STAK" to "TEXT".  
3. Use a word processor to open the resulting file. If you are using
Microsoft Word, you can hold down all the keys on the left side of the
keyboard (CMD OPT SHIFT META TOP FRONT GREEK CONTROL) and then use the
"Open" command which is now "Open Any File ..." to open it, skipping
step 2.

Theory Corner: Hypercard Stores the scripts in clear text in the stack.
When you open the stack with a word processor, you see the scripts in
there, surrounded with garbage.

Recovery Method B involves writing a script that loops, going directly
to card <n> and getting the text of field <m> of it and using the Open
File and Write commands to dump the text out. Of course, if you touch
the broken object, you will lose, for the following reason.

The theory goes like this: your stack is corrupted, which means that
some object (card, field, bg, btn) is "broken." Hypercard detects this
condition and ejects you from the stack whenever you try to access the
broken object. So, for example, you could theoretically get all the
other objects out, possibly intact, by knowing which objects were
broken and skipping them.

There are several share ware stacks out there somewhere that perform
this function. Good luck.

bill coderre
future apple employee, if I can help it.