Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ames!sdcsvax!sdcc6!sdacs!wade From: wade@sdacs.ucsd.EDU (Wade S. Blomgren) Newsgroups: comp.sys.mac Subject: Re: Cursor Control Message-ID: <445@sdacs.ucsd.EDU> Date: Tue, 22-Sep-87 18:50:14 EDT Article-I.D.: sdacs.445 Posted: Tue Sep 22 18:50:14 1987 Date-Received: Fri, 25-Sep-87 01:21:24 EDT References: Organization: UCSD Academic Computing Services Lines: 31 In , (Robert George Johnston, Jr.) writes: > Does anybody know how to move the cursor from within an application. (I > don't mean with the mouse, but by actually changing the coordinates with a > program). I also need to know if it is possible to constrain the motion of > the cursor to a smaller rectangle than the screen. In answer to the second question, there is a low memory global called CrsrPin, the cursor pinning rectangle, at location Ox834. To restrict the movement of the cursor to a given rectangle, save the contents of CrsrPin somewhere, and insert your own values. (Please restore the old values when your program exits). eg: extern Rect CrsrPin : Ox834; Rect OldCrsrPin, NewRect = { 10,10,20,20 }; OldCrsrPin = CrsrPin; CrsrPin = NewRect; /* do your thing here */ CrsrPin = OldCrsrPin; My follow up questions are: How can you (easily) induce the new pinning rectangle to take effect without mouse movement? (This would answer question number 1) Where does CrsrPin fit in when you have more than one monitor? Wade Blomgren UCSD ACS (wade@sdacs.ucsd.edu)