Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!stjhmc!p88.f15.n300.z1.fidonet.org!Lawson.English From: Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) Newsgroups: comp.sys.mac.programmer Subject: Re: Idle and Hypercard 2.0 Message-ID: <34231.27875327@stjhmc.fidonet.org> Date: 6 Jan 91 16:25:51 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:300/15.88 - Tucson Apple Core, Tucson AZ Lines: 37 Jeff E Mandel Md Ms writes in a message to All JEM> Here's a question, since MacDTS is on (gasp!) vacation. I have an XCMD >which sits in a loop waiting for a condition to match or a timer to expire, >but I'd like other processes *in* Hypercard to get time. (That is, GNE or >WNE won't do the trick.) Should I SendCardMessage(paramPtr, 'idle')? That >doesn't seem to work. Suggestions are welcome. > JEM> I assume general housekeeping (redrawing windows, etc.) is the JEM> main function for which you would want Idle time; there seems JEM> no workaround for this except to relinquish control from your JEM> XCMD and grab it back after the next idle: In HC 2.0, there is a callback(?) described on page 460 of the HyperCard Script Language Guide called: "SendHCEvent(ParamPtr, event);" This will pass along events recieved from GNE or WNE. As you are (I presume from the docs) the one in control, you can be scanning for your tickCount change in the loop with GNE/WNE and send SendHCEvent while your tickCount hasn't changed enough to go head with your XCMD task. Obviouly this was a common problem in 1.xx Lawson -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English Internet: Lawson.English@p88.f15.n300.z1.fidonet.org