[comp.sys.mac.hypercard] Timers and Mouse Actions in Superca

cs290ac@ux1.cso.uiuc.edu (02/17/90)

well, on #1,
what can be done is to have a global variable, say called timer, which
keeps a countdown, and on idle, subtract 1 from it, and if it's < 1, do
whatever you wanted.  This may be somewhat inaccurate (no more than a couple
of seconds I'd say), but I don't think there's any other way.  You can be sure It would do the task, but it might not do it right on time.

On the subject of the mouse movement... this is tricky, what you might
have to do is to on idle check where the mouse is, and if its not somewhere 'legal', you might be able to set it to something 'legal'.

But this is cumbersome, and slow, and maybe impossible (#2 that is).
Another solution might be a XCMD to intercept mouse movement at the
toolbox level... I'm not sure about the possibility of #2.

--Ron Smith