home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 468.lha / SetMouse_v1.1 / SetMouse.doc < prev    next >
Text File  |  1991-02-08  |  3KB  |  86 lines

  1. *****************************************************************
  2. SetMouse.doc    V1.1                                    19-Jan-91
  3. *****************************************************************
  4.  
  5. SetMouse V1.1 places the mouse pointer at coordinates x,y                    
  6.                                                                              
  7. Usage:  SetMouse [x] [y] [wait]                                              
  8.         x coordinate range: 0-639   Regardless of screen resolution.         
  9.         y coordinate range: 0-199                                            
  10. [opt]   left mouse button "pressed" after [wait] seconds                     
  11.                                                                              
  12. To stop timer, use "Break <process number> C" or "Ctrl-C"                    
  13.                                                                              
  14. PD Utilities by David Czaya (1990,1991).                                     
  15. AmigaDOS V2.0 compatible. Support Modula 2.                                  
  16.                                                                              
  17. CIS 73445,407                                                                
  18. PLink -Dave-                                                                 
  19. internet: sun!cup.portal.com!dczaya
  20.  
  21. *****************************************************************
  22.  
  23. Creative Scripting:
  24.  
  25. I find that using SetMouse from within scripts to start certain programs
  26. is extremely useful. For example, I made up the following script to start
  27. DPaint III.
  28.  
  29. ------------------<start>------------------
  30. .KEY res
  31.  
  32. RUN >NIL: DH2:DPaint        ; DPaint hides in here
  33.  
  34. IF <res> EQ "med"           ; Select Med-Res screen. You may have to 
  35.   SetMouse 85 82 3          ; adjust the [delay] time for your system.
  36.   SKIP HitOK                
  37. ENDIF
  38.  
  39. IF <res> EQ "lace"          ; Select Interlace screen
  40.   SetMouse 85 98 3          
  41.   SKIP HitOK
  42. ENDIF
  43.  
  44. IF <res> EQ "hi"            ; Select Hi-Res screen
  45.   SetMouse 85 112 3         
  46.   SKIP HitOK
  47. ELSE                        ; just hit "Ok" to select 
  48.   SetMouse 584 170 3        ; default lo-res screen  
  49.   quit
  50. ENDIF
  51.  
  52. LAB HitOK
  53.   SetMouse 584 170 1        ; Select "Ok"
  54.   quit
  55. -------------------<end>-------------------
  56.  
  57. After saving the script as s:DPaint with the S protection bit set 
  58. (see your Amiga manual), if I now type DPaint into the CLI, the 
  59. program will begin, but the pointer will be placed directly over 
  60. the "Ok" gadget of DPaint's screen requester and the lo-res screen
  61. will be selected automatically.
  62.  
  63. Additionally, I can select the following DPaint screen resolutions
  64. directly from the command line:
  65.  
  66. DPaint med              ; med-res screen
  67. DPaint lace             ; interlace screen
  68. DPaint hi               ; hi-res screen
  69.  
  70. Obviously, you can get as slick as you want here, but you get the point.
  71.  
  72. *****************************************************************
  73.  
  74. Notes: 
  75.  
  76. When using SetMouse with the [delay] parameter enabled to select 
  77. a gadget (or whatever) within another program, it may be preferable
  78. to RUN SetMouse so that you can start the other program.
  79.  
  80. SetMouse uses the timer device and a Wait() rather than the DOS Delay() 
  81. function, so that you can break the delay. If you RUN SetMouse, use the
  82. C:Break command as detailed above; otherwise, you can just press Ctrl-C
  83. (the Ctrl Key and the C key simultaneously) to break SetMouse.
  84.  
  85.  
  86.