Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!vsi1!apple!jdevoto From: jdevoto@Apple.COM (Jeanne A. E. DeVoto) Newsgroups: comp.sys.mac.hypercard Subject: Re: Wanted: a fun stack for a 1-year-old Message-ID: <25820@apple.Apple.COM> Date: 14 Feb 89 21:56:34 GMT References: <479@grand.UUCP> <671@internal.Apple.COM> Organization: Apple Computer Inc, Cupertino, CA Lines: 42 In article <671@internal.Apple.COM> casseres@Apple.COM (David Casseres) writes: >In article <479@grand.UUCP> day@grand.UUCP (Dave Yost) writes: >>My baby loves to play with the keyboard and the mouse. >>She needs something really simple to play with on the mac > >I've been wanting to do something like this but haven't been able to >figure out how to intercept keystrokes. Anyone have a clue? One way to do this kind of thing involves using the blindTyping property (so anything the kid types goes into the message box) along with an idle handler to check the contents of the message box (and beep, play a song, flash, or do some other child-pleasing thing if the box contains lets say a space). Of course,you take a performance hit from the idle handler, but for a child's play stack of this type, I wouldn't think that would make much difference. on openStack global msgLoc, theLevel set the blindTyping to true put the userLevel into theLevel set the userLevel to 1 put the loc of the message box into msgLoc set the loc of the message box to -20,200 end openStack on idle if the message box is not empty then if the message box contains space then beep else if the message box contains "m" then flash 1 times [ etc ] put empty into the message box end if end idle on closeStack global msgLoc, theLevel set the userLevel to theLevel set the lock of the message box to msgLoc end openStack jeanne a. e. devoto jdevoto@apple.com