Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.hypercard Subject: Re: disabling command-q Message-ID: <9229@hoptoad.uucp> Date: 8 Dec 89 22:00:34 GMT References: Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 29 In article jk4i+@andrew.cmu.edu (John McCall Kingsley, III) writes: >I am trying to figure out a way that I can diable the user from using >command-q and closing the stack, in my application the user must quit >using one of my quit buttons, otherwise the databases get messed up, so >is there anyway to trap the command-q and return to the card that you >were on at the time of the command-q on doMenu w if w is not "Quit Hypercard" then pass doMenu end doMenu This will also intercept "domenu 'Quit HyperCard'" from your buttons, so bypass it on your own "quit" button: send "doMenu " & quote & "Quit HyperCard" & quote to HyperCard Incidentally, rather than disabling Command-Q, why not make it equivalent to your quit button? That would make the script above be: on doMenu w if w is not "Quit Hypercard" then pass doMenu send mouseUp to button "Quit" end doMenu -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "The time is gone, the song is over. Thought I'd something more to say." - Roger Waters, Time