Is there a way to recover the stack file from a classic MacStandalone

Monte Goulding monte at sweattechnologies.com
Thu Apr 1 23:27:56 EST 2004


Hi... I don't think anyone has ever done it but in theory it's doable.

The first chars in a stackfile are #!/bin/sh

So something like:

on mouseUp
  answer file "Standalone"
  if it is "cancel" then exit to top
  put url ("binfile:"&it) into tStack
  repeat forever -- there's more than one stackfile in there which is
interesting ;-)
    put offset("#!/bin/sh",char 10 to -1 of tStack) into tOff
    if tOff = 0 then exit repeat
    put char tOff+9 to -1 of tStack into tStack
  end repeat
  ask file "Stack"
  if it is "cancel" then exit to top
  set the fileType to "RevoRSTK"
  put tStack into url ("binfile:"&it)
end mouseUp

I tested this on Windows and it works. I can't see any reason why it
wouldn't work on MacOS. I added in the fileType line just to make it easy
;-)

Hope this helps.

Cheers

Monte



More information about the use-livecode mailing list