Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.programmer Subject: Re: Placing Pointer Programatically? Message-ID: <18112@cbmvax.commodore.com> Date: 26 Jan 91 01:52:09 GMT References: <1991Jan24.132154.13609@murdoch.acc.Virginia.EDU> Reply-To: peter@cbmvax.commodore.com (Peter Cherna) Organization: Commodore, West Chester, PA Lines: 29 In article <1991Jan24.132154.13609@murdoch.acc.Virginia.EDU> tmb@davinci.acc.Virginia.EDU (Thomas M. Breeden) writes: >What is the best way for a program to move the pointer to a >specific location? > >Looking over the libs manual, I found I can do this by opening >and writing a mouse move to the inputdevice. > >Is this the way? The program's window can ask for active and deactivate window >Intuition messages to attempt to make sure that it doesn't move the >pointer on some other process, but that will still run the risk of >leaking. The correct way to move the pointer is indeed to write a IECLASS_POINTERPOS event to the input.device. However, remember that the pointer is an extension of the user's hand. Constraining the pointer is hardly better than tying his hand. Even without knowing your application, I'd bet there's a 90% chance that you'd be better off letting the pointer move freely. Pointer constraints are normally unnatural and confuse users. >Tom Breeden Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com My opinions do not necessarily represent the opinions of my employer. "Oh, PIN-compatible! I thought you wanted me to make it IN-compatible!"