[comp.sys.mac.hypercard] Thoroughly protecting stacks

dan@Apple.COM (Dan Allen) (06/08/88)

There is one easy way to get around ANY executing script, even a
"DoMenu" handler: Command Period.

Dan Allen
Apple Computer

taylorj@byuvax.bitnet (06/09/88)

In response to my posting, Dan Allen writes:

>There is one easy way to get around ANY executing script, even a
>"DoMenu" handler: Command Period.

>Dan Allen
>Apple Computer

This is quite true.  But unless I'm missing something, it won't help you
circumvent the following:

The userlevel is set to browse.  The message box is hidden.  The only way
you can raise the userlevel, and thus gain any control over the stack, is
to type the needed HyperTalk commands into the message box.  But if the
"Message" menu command (which includes Command-M) is trapped by a domenu
handler, you can't get the message box.  You are effectively locked out
of making any changes to the stack.

Jim Taylor
Microcomputer Support for Curriculum, Brigham Young University
taylorj@byuvax.bitnet

hvt@tnosel.UUCP (henq) (07/02/88)

In article <208taylorj@byuvax.bitnet> taylorj@byuvax.bitnet writes:
>
>The userlevel is set to browse.  The message box is hidden.  The only way
>you can raise the userlevel, and thus gain any control over the stack, is
>to type the needed HyperTalk commands into the message box.  But if the
>"Message" menu command (which includes Command-M) is trapped by a domenu
>handler, you can't get the message box.  You are effectively locked out
>of making any changes to the stack.


The menuhandler used in protected stacks usually is located
in the background or at the stack level. I once made a small stack to
patch this sort of scripts. Basically, one button fetches the script 
and puts it in a scrollable field where you can edit it. A second
button puts the changed script back in place. The button scripts
are something like: (I havenUt been hypering since long, so it's
pseudo-hypertalk at best 8).

--the fetch button:
on mouseup
  push card
  get the script of stack TargetStack   --use SFfile XCMD to get it
  pop card
  put it into card field EditMe
end mouseup

--the restore button:
on mouseup
  get card field Editme
  push card
  put it into stack TargetStack
  pop card
end mouseup

Hope this is of some sort of help to ya.

Henk vanTyen

Have a nice day!

IP60538%PORTLAND.BITNET@MITVMA.MIT.EDU (Earl Christensen) (07/11/88)

On a chalange from a friend who has written a very nice stack,which he
thought was locked up tight......
I used MacTools to edit the data fork of the stack.
for further info Email to me or call (207)774-8522  for obvious reasons
only use MacTools on copies.