home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- SetMouse.doc V1.1 19-Jan-91
- *****************************************************************
-
- SetMouse V1.1 places the mouse pointer at coordinates x,y
-
- Usage: SetMouse [x] [y] [wait]
- x coordinate range: 0-639 Regardless of screen resolution.
- y coordinate range: 0-199
- [opt] left mouse button "pressed" after [wait] seconds
-
- To stop timer, use "Break <process number> C" or "Ctrl-C"
-
- PD Utilities by David Czaya (1990,1991).
- AmigaDOS V2.0 compatible. Support Modula 2.
-
- CIS 73445,407
- PLink -Dave-
- internet: sun!cup.portal.com!dczaya
-
- *****************************************************************
-
- Creative Scripting:
-
- I find that using SetMouse from within scripts to start certain programs
- is extremely useful. For example, I made up the following script to start
- DPaint III.
-
- ------------------<start>------------------
- .KEY res
-
- RUN >NIL: DH2:DPaint ; DPaint hides in here
-
- IF <res> EQ "med" ; Select Med-Res screen. You may have to
- SetMouse 85 82 3 ; adjust the [delay] time for your system.
- SKIP HitOK
- ENDIF
-
- IF <res> EQ "lace" ; Select Interlace screen
- SetMouse 85 98 3
- SKIP HitOK
- ENDIF
-
- IF <res> EQ "hi" ; Select Hi-Res screen
- SetMouse 85 112 3
- SKIP HitOK
- ELSE ; just hit "Ok" to select
- SetMouse 584 170 3 ; default lo-res screen
- quit
- ENDIF
-
- LAB HitOK
- SetMouse 584 170 1 ; Select "Ok"
- quit
- -------------------<end>-------------------
-
- After saving the script as s:DPaint with the S protection bit set
- (see your Amiga manual), if I now type DPaint into the CLI, the
- program will begin, but the pointer will be placed directly over
- the "Ok" gadget of DPaint's screen requester and the lo-res screen
- will be selected automatically.
-
- Additionally, I can select the following DPaint screen resolutions
- directly from the command line:
-
- DPaint med ; med-res screen
- DPaint lace ; interlace screen
- DPaint hi ; hi-res screen
-
- Obviously, you can get as slick as you want here, but you get the point.
-
- *****************************************************************
-
- Notes:
-
- When using SetMouse with the [delay] parameter enabled to select
- a gadget (or whatever) within another program, it may be preferable
- to RUN SetMouse so that you can start the other program.
-
- SetMouse uses the timer device and a Wait() rather than the DOS Delay()
- function, so that you can break the delay. If you RUN SetMouse, use the
- C:Break command as detailed above; otherwise, you can just press Ctrl-C
- (the Ctrl Key and the C key simultaneously) to break SetMouse.
-
-
-