Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!wiml From: wiml@milton.u.washington.edu (William Lewis) Newsgroups: comp.sys.next Subject: Re: Attaching sounds to actions? Message-ID: <15107@milton.u.washington.edu> Date: 25 Jan 91 05:03:14 GMT References: <1991Jan24.025448.1705@macc.wisc.edu> <7897@umd5.umd.edu> Distribution: na Organization: University of Washington, Seattle Lines: 30 Attaching sounds to command-line actions is fairly easy, since you can get at the program that interprets your actions... the hard part would seem to be getting sounds associated with the *GUI* actions, like logging in, using the abbatoir, etc. Logging in and out is not too difficult: there are system defaults (set by root) named LoginHook and LogoutHook, which point to programs that are executed every time anyone logs in and out on the console. You couls make scripts for these containing appropriate sndplays. Harder are the other actions, the ones that are performed by clicking on buttons in the Workspace Manager. The only way I can think of to change these is to modify the WM. This isn't as difficult as it sounds -- all Mach-O format NextStep applications contain (among other things) their .nib files, stored in such a way that it is possible to extract them, edit them (with InterfaceBuilder) to include sounds on the buttons, and reinsert them. (A utility that does this is named 'segedit'. 1.0 has its manpage but no executeable. I think 2.0 has the exe. In any case, there's a program on the archives named 'fsectbyname' that will do this as long as you don't try to insert a file larger than it used to be -- this is troublesome though since sounds in the .nib make them larger.) This is definitely "hacky" but it ought to work (so long as you're root so you can replace the WM ...) -- wiml@milton.acs.washington.edu Seattle, Washington (William Lewis) | 47 41' 15" N 122 42' 58" W "If a wave function collapses in the forest and no-one is around to observe it ..."