Home » Archimedes archive » Acorn User » AU 1997-06 B.adf » Extras » RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/Mouse-Stat
RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/Mouse-Stat
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-06 B.adf » Extras |
Filename: | RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/Mouse-Stat |
Read OK: | ✔ |
File size: | 0930 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Check_MouseState : This command works along the same lines as the 'Check_KeyboardState' and 'Check_KeyBoardNumber' commands. It enables the user to find out the state of the mouse. I.e. position (X,Y), and what buttons (if any) are being pressed. Useful for intelligent Run file's. E.g. While Booting, press select to Run Impression, adjust for Artworks etc. Or before loading Edit, hold down select+menu to load flasher as well. If no button is pressed, only Edit is loaded. Using the command : The command has no parameters, once issued it simply sets some variables. The command is : Check_MouseState Will tell the user 'the state of the mouse' at the time it was issued. When issued 3 variable's are set : MouseXcoordinate MouseYcoordinate MouseButtonState The variable MouseXcoordinate = the number of pixels the pointer is from the left side of the screen. The variable MouseYcoordinate = the number of pixels the pointer is from the bottom of the screen. The variable MouseButtonState = whatever button(s) was being pressed when 'Check_MouseState' was issued. E.g. 'None', 'Select, 'Menu', 'Adjust', or combinations 'Select+Menu'. To get to grips with the command easliy, run the files Mouse-Con, and MouseOnce, in the Directory RISCutils.User_Area.Demo's. The command can be used as so: (E.g. in boot sequences) Run ADFS::HardDisc4.$.!Tools.FILES.!RISCutils Check_MouseState IF Mousestate=�Adjust� Then Run ADFS::HardDisc4.$.!Games.Files.!Star3000 IF Mousestate=�Select� Then Run ADFS::HardDisc4.$.!DTP.Packages.!Publish+ To activate the component simply run 'RISCutils', with the 'Check_MouseState' option in RISCutil's !Run file set to 'Y'. To de-activate it run the file RISCutils.User_Area.Files.Remove, and run 'RISCutils', with the 'Check_MouseState' option set to 'N.' N.B. When using RISCutils version 1.00 (this is version 1.01), the values given by the Check_MouseState were approximatly twice the actual values. E.g. if the mouse was in the top right hand corner of an 800x600 screen, MouseXcoordinate would equal 1599, and MouseYcoordinate would equal 1199. This problem has now been overcome, and the values are fully accurate. *** If you are upgrading from RISCutils version 1.00, any Files/Programs using the Check_MouseState command may have to updated, as the values the command now gives will be different. ***
00000000 0a 43 68 65 63 6b 5f 4d 6f 75 73 65 53 74 61 74 |.Check_MouseStat| 00000010 65 20 3a 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 |e : This command| 00000020 20 77 6f 72 6b 73 20 61 6c 6f 6e 67 20 74 68 65 | works along the| 00000030 20 73 61 6d 65 20 6c 69 6e 65 73 20 61 73 20 74 | same lines as t| 00000040 68 65 20 27 43 68 65 63 6b 5f 4b 65 79 62 6f 61 |he 'Check_Keyboa| 00000050 72 64 53 74 61 74 65 27 20 61 6e 64 20 27 43 68 |rdState' and 'Ch| 00000060 65 63 6b 5f 4b 65 79 42 6f 61 72 64 4e 75 6d 62 |eck_KeyBoardNumb| 00000070 65 72 27 20 63 6f 6d 6d 61 6e 64 73 2e 20 49 74 |er' commands. It| 00000080 20 65 6e 61 62 6c 65 73 20 74 68 65 20 75 73 65 | enables the use| 00000090 72 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 74 68 |r to find out th| 000000a0 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 6d |e state of the m| 000000b0 6f 75 73 65 2e 20 49 2e 65 2e 20 70 6f 73 69 74 |ouse. I.e. posit| 000000c0 69 6f 6e 20 28 58 2c 59 29 2c 20 61 6e 64 20 77 |ion (X,Y), and w| 000000d0 68 61 74 20 62 75 74 74 6f 6e 73 20 28 69 66 20 |hat buttons (if | 000000e0 61 6e 79 29 20 61 72 65 20 62 65 69 6e 67 20 70 |any) are being p| 000000f0 72 65 73 73 65 64 2e 20 55 73 65 66 75 6c 20 66 |ressed. Useful f| 00000100 6f 72 20 69 6e 74 65 6c 6c 69 67 65 6e 74 20 52 |or intelligent R| 00000110 75 6e 20 66 69 6c 65 27 73 2e 20 45 2e 67 2e 20 |un file's. E.g. | 00000120 57 68 69 6c 65 20 42 6f 6f 74 69 6e 67 2c 20 70 |While Booting, p| 00000130 72 65 73 73 20 73 65 6c 65 63 74 20 74 6f 20 52 |ress select to R| 00000140 75 6e 20 49 6d 70 72 65 73 73 69 6f 6e 2c 20 61 |un Impression, a| 00000150 64 6a 75 73 74 20 66 6f 72 20 41 72 74 77 6f 72 |djust for Artwor| 00000160 6b 73 20 65 74 63 2e 20 4f 72 20 62 65 66 6f 72 |ks etc. Or befor| 00000170 65 20 6c 6f 61 64 69 6e 67 20 45 64 69 74 2c 20 |e loading Edit, | 00000180 68 6f 6c 64 20 64 6f 77 6e 20 73 65 6c 65 63 74 |hold down select| 00000190 2b 6d 65 6e 75 20 74 6f 20 6c 6f 61 64 20 66 6c |+menu to load fl| 000001a0 61 73 68 65 72 20 61 73 20 77 65 6c 6c 2e 20 49 |asher as well. I| 000001b0 66 20 6e 6f 20 62 75 74 74 6f 6e 20 69 73 20 70 |f no button is p| 000001c0 72 65 73 73 65 64 2c 20 6f 6e 6c 79 20 45 64 69 |ressed, only Edi| 000001d0 74 20 69 73 20 6c 6f 61 64 65 64 2e 0a 0a 55 73 |t is loaded...Us| 000001e0 69 6e 67 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 |ing the command | 000001f0 3a 0a 0a 54 68 65 20 63 6f 6d 6d 61 6e 64 20 68 |:..The command h| 00000200 61 73 20 6e 6f 20 70 61 72 61 6d 65 74 65 72 73 |as no parameters| 00000210 2c 20 6f 6e 63 65 20 69 73 73 75 65 64 20 69 74 |, once issued it| 00000220 20 73 69 6d 70 6c 79 20 73 65 74 73 20 73 6f 6d | simply sets som| 00000230 65 20 76 61 72 69 61 62 6c 65 73 2e 20 54 68 65 |e variables. The| 00000240 20 63 6f 6d 6d 61 6e 64 20 69 73 20 3a 0a 0a 43 | command is :..C| 00000250 68 65 63 6b 5f 4d 6f 75 73 65 53 74 61 74 65 0a |heck_MouseState.| 00000260 0a 57 69 6c 6c 20 74 65 6c 6c 20 74 68 65 20 75 |.Will tell the u| 00000270 73 65 72 20 27 74 68 65 20 73 74 61 74 65 20 6f |ser 'the state o| 00000280 66 20 74 68 65 20 6d 6f 75 73 65 27 20 61 74 20 |f the mouse' at | 00000290 74 68 65 20 74 69 6d 65 20 69 74 20 77 61 73 20 |the time it was | 000002a0 69 73 73 75 65 64 2e 20 57 68 65 6e 20 69 73 73 |issued. When iss| 000002b0 75 65 64 20 33 20 76 61 72 69 61 62 6c 65 27 73 |ued 3 variable's| 000002c0 20 61 72 65 20 73 65 74 20 3a 0a 0a 4d 6f 75 73 | are set :..Mous| 000002d0 65 58 63 6f 6f 72 64 69 6e 61 74 65 0a 4d 6f 75 |eXcoordinate.Mou| 000002e0 73 65 59 63 6f 6f 72 64 69 6e 61 74 65 0a 4d 6f |seYcoordinate.Mo| 000002f0 75 73 65 42 75 74 74 6f 6e 53 74 61 74 65 0a 0a |useButtonState..| 00000300 54 68 65 20 76 61 72 69 61 62 6c 65 20 4d 6f 75 |The variable Mou| 00000310 73 65 58 63 6f 6f 72 64 69 6e 61 74 65 20 3d 20 |seXcoordinate = | 00000320 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 69 |the number of pi| 00000330 78 65 6c 73 20 74 68 65 20 70 6f 69 6e 74 65 72 |xels the pointer| 00000340 20 69 73 20 66 72 6f 6d 20 74 68 65 20 6c 65 66 | is from the lef| 00000350 74 20 73 69 64 65 20 6f 66 20 74 68 65 20 73 63 |t side of the sc| 00000360 72 65 65 6e 2e 0a 54 68 65 20 76 61 72 69 61 62 |reen..The variab| 00000370 6c 65 20 4d 6f 75 73 65 59 63 6f 6f 72 64 69 6e |le MouseYcoordin| 00000380 61 74 65 20 3d 20 74 68 65 20 6e 75 6d 62 65 72 |ate = the number| 00000390 20 6f 66 20 70 69 78 65 6c 73 20 74 68 65 20 70 | of pixels the p| 000003a0 6f 69 6e 74 65 72 20 69 73 20 66 72 6f 6d 20 74 |ointer is from t| 000003b0 68 65 20 62 6f 74 74 6f 6d 20 6f 66 20 74 68 65 |he bottom of the| 000003c0 20 73 63 72 65 65 6e 2e 0a 54 68 65 20 76 61 72 | screen..The var| 000003d0 69 61 62 6c 65 20 4d 6f 75 73 65 42 75 74 74 6f |iable MouseButto| 000003e0 6e 53 74 61 74 65 20 3d 20 77 68 61 74 65 76 65 |nState = whateve| 000003f0 72 20 62 75 74 74 6f 6e 28 73 29 20 77 61 73 20 |r button(s) was | 00000400 62 65 69 6e 67 20 70 72 65 73 73 65 64 20 77 68 |being pressed wh| 00000410 65 6e 20 27 43 68 65 63 6b 5f 4d 6f 75 73 65 53 |en 'Check_MouseS| 00000420 74 61 74 65 27 20 77 61 73 20 69 73 73 75 65 64 |tate' was issued| 00000430 2e 20 45 2e 67 2e 20 27 4e 6f 6e 65 27 2c 20 27 |. E.g. 'None', '| 00000440 53 65 6c 65 63 74 2c 20 27 4d 65 6e 75 27 2c 20 |Select, 'Menu', | 00000450 27 41 64 6a 75 73 74 27 2c 20 6f 72 20 63 6f 6d |'Adjust', or com| 00000460 62 69 6e 61 74 69 6f 6e 73 20 27 53 65 6c 65 63 |binations 'Selec| 00000470 74 2b 4d 65 6e 75 27 2e 0a 0a 54 6f 20 67 65 74 |t+Menu'...To get| 00000480 20 74 6f 20 67 72 69 70 73 20 77 69 74 68 20 74 | to grips with t| 00000490 68 65 20 63 6f 6d 6d 61 6e 64 20 65 61 73 6c 69 |he command easli| 000004a0 79 2c 20 72 75 6e 20 74 68 65 20 66 69 6c 65 73 |y, run the files| 000004b0 20 4d 6f 75 73 65 2d 43 6f 6e 2c 20 61 6e 64 20 | Mouse-Con, and | 000004c0 4d 6f 75 73 65 4f 6e 63 65 2c 20 69 6e 20 74 68 |MouseOnce, in th| 000004d0 65 20 44 69 72 65 63 74 6f 72 79 20 52 49 53 43 |e Directory RISC| 000004e0 75 74 69 6c 73 2e 55 73 65 72 5f 41 72 65 61 2e |utils.User_Area.| 000004f0 44 65 6d 6f 27 73 2e 0a 0a 54 68 65 20 63 6f 6d |Demo's...The com| 00000500 6d 61 6e 64 20 63 61 6e 20 62 65 20 75 73 65 64 |mand can be used| 00000510 20 61 73 20 73 6f 3a 20 28 45 2e 67 2e 20 69 6e | as so: (E.g. in| 00000520 20 62 6f 6f 74 20 73 65 71 75 65 6e 63 65 73 29 | boot sequences)| 00000530 0a 0a 52 75 6e 20 41 44 46 53 3a 3a 48 61 72 64 |..Run ADFS::Hard| 00000540 44 69 73 63 34 2e 24 2e 21 54 6f 6f 6c 73 2e 46 |Disc4.$.!Tools.F| 00000550 49 4c 45 53 2e 21 52 49 53 43 75 74 69 6c 73 20 |ILES.!RISCutils | 00000560 0a 43 68 65 63 6b 5f 4d 6f 75 73 65 53 74 61 74 |.Check_MouseStat| 00000570 65 0a 49 46 20 4d 6f 75 73 65 73 74 61 74 65 3d |e.IF Mousestate=| 00000580 94 41 64 6a 75 73 74 95 20 54 68 65 6e 20 52 75 |.Adjust. Then Ru| 00000590 6e 20 41 44 46 53 3a 3a 48 61 72 64 44 69 73 63 |n ADFS::HardDisc| 000005a0 34 2e 24 2e 21 47 61 6d 65 73 2e 46 69 6c 65 73 |4.$.!Games.Files| 000005b0 2e 21 53 74 61 72 33 30 30 30 0a 49 46 20 4d 6f |.!Star3000.IF Mo| 000005c0 75 73 65 73 74 61 74 65 3d 94 53 65 6c 65 63 74 |usestate=.Select| 000005d0 95 20 54 68 65 6e 20 52 75 6e 20 41 44 46 53 3a |. Then Run ADFS:| 000005e0 3a 48 61 72 64 44 69 73 63 34 2e 24 2e 21 44 54 |:HardDisc4.$.!DT| 000005f0 50 2e 50 61 63 6b 61 67 65 73 2e 21 50 75 62 6c |P.Packages.!Publ| 00000600 69 73 68 2b 0a 0a 54 6f 20 61 63 74 69 76 61 74 |ish+..To activat| 00000610 65 20 74 68 65 20 63 6f 6d 70 6f 6e 65 6e 74 20 |e the component | 00000620 73 69 6d 70 6c 79 20 72 75 6e 20 27 52 49 53 43 |simply run 'RISC| 00000630 75 74 69 6c 73 27 2c 20 77 69 74 68 20 74 68 65 |utils', with the| 00000640 20 27 43 68 65 63 6b 5f 4d 6f 75 73 65 53 74 61 | 'Check_MouseSta| 00000650 74 65 27 20 6f 70 74 69 6f 6e 20 69 6e 20 52 49 |te' option in RI| 00000660 53 43 75 74 69 6c 27 73 20 21 52 75 6e 20 66 69 |SCutil's !Run fi| 00000670 6c 65 20 73 65 74 20 74 6f 20 27 59 27 2e 20 54 |le set to 'Y'. T| 00000680 6f 20 64 65 2d 61 63 74 69 76 61 74 65 20 69 74 |o de-activate it| 00000690 20 72 75 6e 20 74 68 65 20 66 69 6c 65 20 52 49 | run the file RI| 000006a0 53 43 75 74 69 6c 73 2e 55 73 65 72 5f 41 72 65 |SCutils.User_Are| 000006b0 61 2e 46 69 6c 65 73 2e 52 65 6d 6f 76 65 2c 20 |a.Files.Remove, | 000006c0 61 6e 64 20 72 75 6e 20 27 52 49 53 43 75 74 69 |and run 'RISCuti| 000006d0 6c 73 27 2c 20 77 69 74 68 20 74 68 65 20 27 43 |ls', with the 'C| 000006e0 68 65 63 6b 5f 4d 6f 75 73 65 53 74 61 74 65 27 |heck_MouseState'| 000006f0 20 6f 70 74 69 6f 6e 20 73 65 74 20 74 6f 20 27 | option set to '| 00000700 4e 2e 27 0a 0a 4e 2e 42 2e 20 57 68 65 6e 20 75 |N.'..N.B. When u| 00000710 73 69 6e 67 20 52 49 53 43 75 74 69 6c 73 20 76 |sing RISCutils v| 00000720 65 72 73 69 6f 6e 20 31 2e 30 30 20 28 74 68 69 |ersion 1.00 (thi| 00000730 73 20 69 73 20 76 65 72 73 69 6f 6e 20 31 2e 30 |s is version 1.0| 00000740 31 29 2c 20 74 68 65 20 76 61 6c 75 65 73 20 67 |1), the values g| 00000750 69 76 65 6e 20 62 79 20 74 68 65 20 43 68 65 63 |iven by the Chec| 00000760 6b 5f 4d 6f 75 73 65 53 74 61 74 65 20 77 65 72 |k_MouseState wer| 00000770 65 20 61 70 70 72 6f 78 69 6d 61 74 6c 79 20 74 |e approximatly t| 00000780 77 69 63 65 20 74 68 65 20 61 63 74 75 61 6c 20 |wice the actual | 00000790 76 61 6c 75 65 73 2e 20 45 2e 67 2e 20 69 66 20 |values. E.g. if | 000007a0 74 68 65 20 6d 6f 75 73 65 20 77 61 73 20 69 6e |the mouse was in| 000007b0 20 74 68 65 20 74 6f 70 20 72 69 67 68 74 20 68 | the top right h| 000007c0 61 6e 64 20 63 6f 72 6e 65 72 20 6f 66 20 61 6e |and corner of an| 000007d0 20 38 30 30 78 36 30 30 20 73 63 72 65 65 6e 2c | 800x600 screen,| 000007e0 20 4d 6f 75 73 65 58 63 6f 6f 72 64 69 6e 61 74 | MouseXcoordinat| 000007f0 65 20 77 6f 75 6c 64 20 65 71 75 61 6c 20 31 35 |e would equal 15| 00000800 39 39 2c 20 61 6e 64 20 4d 6f 75 73 65 59 63 6f |99, and MouseYco| 00000810 6f 72 64 69 6e 61 74 65 20 77 6f 75 6c 64 20 65 |ordinate would e| 00000820 71 75 61 6c 20 31 31 39 39 2e 20 54 68 69 73 20 |qual 1199. This | 00000830 70 72 6f 62 6c 65 6d 20 68 61 73 20 6e 6f 77 20 |problem has now | 00000840 62 65 65 6e 20 6f 76 65 72 63 6f 6d 65 2c 20 61 |been overcome, a| 00000850 6e 64 20 74 68 65 20 76 61 6c 75 65 73 20 61 72 |nd the values ar| 00000860 65 20 66 75 6c 6c 79 20 61 63 63 75 72 61 74 65 |e fully accurate| 00000870 2e 0a 2a 2a 2a 20 49 66 20 79 6f 75 20 61 72 65 |..*** If you are| 00000880 20 75 70 67 72 61 64 69 6e 67 20 66 72 6f 6d 20 | upgrading from | 00000890 52 49 53 43 75 74 69 6c 73 20 76 65 72 73 69 6f |RISCutils versio| 000008a0 6e 20 31 2e 30 30 2c 20 61 6e 79 20 46 69 6c 65 |n 1.00, any File| 000008b0 73 2f 50 72 6f 67 72 61 6d 73 20 75 73 69 6e 67 |s/Programs using| 000008c0 20 74 68 65 20 43 68 65 63 6b 5f 4d 6f 75 73 65 | the Check_Mouse| 000008d0 53 74 61 74 65 20 63 6f 6d 6d 61 6e 64 20 6d 61 |State command ma| 000008e0 79 20 68 61 76 65 20 74 6f 20 75 70 64 61 74 65 |y have to update| 000008f0 64 2c 20 61 73 20 74 68 65 20 76 61 6c 75 65 73 |d, as the values| 00000900 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 6e 6f 77 | the command now| 00000910 20 67 69 76 65 73 20 77 69 6c 6c 20 62 65 20 64 | gives will be d| 00000920 69 66 66 65 72 65 6e 74 2e 20 2a 2a 2a 0a 0a 0a |ifferent. ***...| 00000930