🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #19403

Re: Cursor Control

#19403
From: Wade S. Blomgren
Date: Tue, 22 Sep 1987 22:50
31 lines
1670 bytes
In <sVJ1zsy00UgLwe00=B@andrew.cmu.edu>, (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)
Technical Details
Message-ID: <445@sdacs.ucsd.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ames!sdcsvax!sdcc6!sdacs!wade
References: <sVJ1zsy00UgLwe00=B@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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: <sVJ1zsy00UgLwe00=B@andrew.cmu.edu>
Organization: UCSD Academic Computing Services
Lines: 31