Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!ut-sally!utah-cs!mindblow!hpai From: hpai%mindblow.uucp@utah-cs.UUCP (HP AI User) Newsgroups: comp.sys.mac Subject: Re: Cursor Control Message-ID: <4991@utah-cs.UUCP> Date: Tue, 22-Sep-87 19:44:51 EDT Article-I.D.: utah-cs.4991 Posted: Tue Sep 22 19:44:51 1987 Date-Received: Thu, 24-Sep-87 07:28:16 EDT References: Sender: news@utah-cs.UUCP Reply-To: u-lchoqu%ug%utah-cs.UUCP@utah-cs.UUCP (Lee Choquette) Organization: Univ of Utah CS Dept Lines: 36 Keywords: compatibility Summary: You can, but don't In article rj0z+@andrew.cmu.edu 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. I spent a while figuring this out last year, and the answer is yes, but only if you want to sacrifice compatibility. There is a set of undocumented low memory globals on the Mac 128K, 512K, and Plus that store cursor info, but I have no idea if they're available on the SE or the II, and there's no guarantee that they'll be there on future machines. CrsrPin at $834 is a rectangle the cursor is pinned to, initially the size of the screen (I don't know about multiple-screen systems). If you make it larger than the screen the Mac crashes. When changing cursor info, set the byte-size boolean CrsrNew at $8CE and wait a tick for the cursor to be updated. CrsrCouple, a byte-size boolean at $8CF, is true if the cursor is coupled to the mouse. Unset it if you don't want the user using the mouse. I couldn't figure out how to move the cursor other than temporarily setting CrsrPin to a tiny rectangle at the point I wanted the cursor. Carefully consider why you want to move the cursor. I used a system called Geos on my friend's Commodore 64 that always helpfully moved the cursor to the point where it thought I wanted it. It drove me crazy. In addition, restricting the cursor's movement has shades of (gasp) MODES, and works against MultiFinder. I think Apple has good reason not to document the cursor routines. ----- Lee Choquette u-lchoqu@ug.utah.edu University of Utah Computer Center CHOQUETTE@UTAHCCA.BITNET MEB 3440 utah-gr!utah-ug!u-lchoqu Salt Lake City, UT 84112 (801) 581-8504