Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!iggy.GW.Vitalink.COM!widener!netnews.upenn.edu!msuinfo!convex.cl.msu.edu!jap From: jap@convex.cl.msu.edu (Joe Porkka) Newsgroups: comp.sys.amiga.programmer Subject: Re: "Task"'ing trubbles Keywords: task programming amiga Message-ID: <1991May21.134741.3067@msuinfo.cl.msu.edu> Date: 21 May 91 13:47:41 GMT References: <1991May21.063012.1358@m.cs.uiuc.edu> Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 20 schwager@m.cs.uiuc.edu (Michael Schwager) writes: >Vital stats: Amiga 500 w/ 3Meg ram, 30 Meg hard drive, using Aztec C 5.0d. >Greets, >I have a small (13 x 13 pixels) box in a window in a CUSTOMSCREEN. I want >to make it flash, and I want it to quit flashing when the user hits another >box. No sweat, right? I figger the best way to do this is to set up a >little task running asynchronously that will do the flashing, so that the >main program can wait for messages and kill the little flasher when a >proper gadget is hit. You could do it without another task by arranging for timer.device evetns to signal you (which would be noticed by Wait()), then simply call Flashit() to blink the box once, reset the timer and return. Instead of using timer.device you could also use IntuiTicks, which come by at 10Hz, and you only see them when your window is active - thus you box would not eat CPU if the users flipped screens and started working on other stuff.