Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!axion!ist!jh From: jh@ist.CO.UK (Jeremy Huxtable) Newsgroups: comp.sys.mac.programmer Subject: How do I write a screen saver? Message-ID: <2813@istop.ist.CO.UK> Date: 27 Jul 90 07:47:20 GMT Organization: Imperial Software Technology, London, UK Lines: 25 A frivolous question.... Having got bored of 'Pyro', I wrote my own firework display as an application but would like to make it work as a screen saver. I can see two routes to this. One is the Multifinder-wait-in-the-background-application route but this suffers from all sorts of disadvantages, especially as I don't understand Multifinder and would like this to work under the ordinary Finder as well. The second method is to patch one or more toolbox traps. I tried patching GetNextEvent and EventAvail, and this works fine under Finder, but fails under MultiFinder. With MultiFinder, the patch is called much less frequently, and erratically. My quesition is: is there a known and approved method of writing a screen saver which anyone would care to share with me? Which traps should be patched, and what should be done to make the thing MultiFinder friendly? One of the Tech. Notes mentions screen savers, but a) doesn't go into any detail and b) seems to expect different things from a screen saver than I do (I want it to cut in automatically after X minutes idleness and cut out again on a mouse movement or other event). Thanks, Jeremy Huxtable P.S. I'll send it to the net if I get it working.