Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!seismo!sundc!pitstop!sun!amdcad!ames!pasteur!agate!skippy!lippin From: lippin@skippy.berkeley.edu (The Apathist) Newsgroups: comp.sys.mac.programmer Subject: Re: GetMouse et al. Message-ID: <16230@agate.BERKELEY.EDU> Date: 30 Oct 88 21:56:52 GMT Article-I.D.: agate.16230 References: <10849@srcsip.UUCP> <162@internal.Apple.COM> <10998@srcsip.UUCP> Sender: usenet@agate.BERKELEY.EDU Reply-To: lippin@math.berkeley.edu Organization: Authorized Service, Incorporated Lines: 30 Recently mnkonar@ely.UUCP (Murat N. Konar) wrote: >This is what I was afraid of. What I'm trying to figure out is how I can >"fake" mouse activity a la QuicKeys and others. I had hoped that manipulating >the event queue would allow me to do this but no dice. What is the best or >easiest (take your pick) way to do this? For most purposes, you can still fake mouse activity by using the event queue, because most programs are interested in the recent past, instead of the present. For example, to fake a click, you can post a mousedown/mouseup pair, and a well-written program will figure the button went down while it wasn't looking. Dragging may be more difficult, as programs might ignore the location of the mouseup event in favor of their own calls to GetMouse. And since presumably you would post both events together, the program's call to StillDown would fail, and so it wouldn't call GetMouse, and the drag wouldn't go anywhere. In a case like this, you can still work with the program interactively by patching GetMouse and Button. --Tom Lippincott ..ucbvax!math!lippin "`The problem's all inside your head,' she said to me. `The program's easy if it's done recursively. I'd like to help you in your struggle for a B; There must be fifty ways to write your program. Fifty ways to write your program.'"