Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!ukc!canon!smith From: smith@canon.co.uk (Mark Smith) Newsgroups: comp.sys.mac Subject: Re: Help! Anyone know how to force the mouse to a location? Message-ID: <1990Jun6.083741.4740@canon.co.uk> Date: 6 Jun 90 08:37:41 GMT References: <1990Jun5.091419.14219@portia.Stanford.EDU> <16995@phoenix.Princeton.EDU> Organization: Canon Research Europe, Guildford, UK Lines: 43 bskendig@phoenix.Princeton.EDU (Brian Kendig) writes: >In article <1990Jun5.091419.14219@portia.Stanford.EDU> canuck@portia.Stanford.EDU (William Stocker) writes: >>I'm writing a Mac program in THINK Pascal 3.0, and need to force the >>mouse to a particular screen location. I'm sure it's against Apple's >>guidelines (there's no SetMouse command I can find in Inside Mac I-V), >>but there's a good purpose for it -- trust me! > DON'T DO IT. It's *very* bad technique, and your application > won't run, besides. >[ ... ] >Tell me what, exactly, this `good purpose' is that you've thought up, >and I and millions of other Netters will help you come up with a more >proper way of doing it. This is something that's bugged me for ages. There *are* valid reasons for moving the mouse pointer under program control, mainly when you are using the mouse to provide relative motions, rather than screen positions. A perfect example of this is the old game Lode Runner, where you indicate the direction of the man on the screen by pushing the mouse in the appropriate direction. The man then keeps going in that direction until the mouse is pushed in another direction. In the game, the pointer is visible on the screen. I wondered why, since the actual pointer position was irrelevant, until I was playing it once and managed to get the pointer flush against one side of the screen, and couldn't go that way anymore. Obviously, what the designers would have preferred to do was hide the pointer and keep throwing it back to the middle of the screen. I appreciate that moving the pointer by software isn't normally a good thing, but it seems to me that they should have discouraged it in the documentation, and perhaps forced you to hide the pointer before doing it, rather than making it impossible. I also ran into this problem when writing an emulator for a piece of graphics hardware which ran in a window on the Mac. Since the thing being emulated allowed the pointer to be moved, I had to as well. ==================================================================== Mark Smith Canon Research Centre Europe smith@canon.co.uk 19 Frederick Sanger Road ..ukc!uos-ee!canon!smith Guildford Surrey UK -------------------------------------------------------------------- "We always planned to ease ourselves into pure research anyway..." -- David Cronenberg, _Dead Ringers_