Home » Archimedes archive » Acorn User » AU 1997-06 B.adf » Extras » RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/If_Task
RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/If_Task
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/If_Task |
Read OK: | ✔ |
File size: | 1354 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
� If_task : The If_Task component of RISCutils provides a command (If_Task ), that will detect wether a named task / program is running or not, and gives the user the option to carry out a command / commands (given by the user) if the Task is found to be running, or it is found to be not running, or both. The format of the command and parameters is (briefly) as follows : If_Task Edit =present ECHO Edit is running If_Task Edit =notpresent ECHO Edit is not running With both lines above, if typed at the command line the program would seach for a Task called "Edit" (note : case sensitive - check with task manager) and if it was found to be running : - The output from the 1st line would be that the command "ECHO Edit is running" would be carried out. - The output from the 2nd line would be that no command would be carried out. If a task called "Edit" is found to be running : - The output from the 1st line would be that no command would be carried out. - The output from the 2nd line would be that the command "ECHO Edit is not running" would be carried out. Of course any command, not just the 'ECHO' command could be carried out as an output. The '=present' and '=notpresent' parameters can be combined on one line in any order, and also 2 commands can be carried out as an output for both states by typing '|M' after the first command, and then entering the 2nd command. So if the user typed at the command line : If_Task Edit =present ECHO Edit is present (1) |M ECHO Edit is present (2) =notpresent ECHO Edit is not present (1) |M ECHO Edit is not present (2) - If Edit was running at the time the command was issued, the commands "ECHO Edit is present (1)" and "ECHO Edit is present (2)" would be carried out. - If Edit was not running at the time the command was issued, the commands "ECHO Edit is not present (1)" and "ECHO Edit is not present (2)" would be carried out. The program is fairly intelligent, and will give the user a number of different Error messages if the format is not adhered to correctly. Note there must be a space: 1. After the command itself "If_Task", 2. Between the Task name and the "=present" or "=notpresent" parameter - using "Edit=notpresent " would make the program look for a Task called "Edit=notpresent ". 3. Between the end of a parameter word (=present or =notpresent) and the command to be carried out for that state. E.g. the user must enter "=present ECHO Edit is running", not "=presentECHO Edit is running". There are a large number of possible uses for this command, but the main one I can think of is to prevent Applications that do not need to be loaded more than once (i.e. ones that by using a single copy of the program can read / display / play etc, more than one file at a time E.g. Edit, Paint, and Draw) from being able to do so. This can be done by entering a single line at the begining of the desired application's !Run file. E.g. for Artworks, entering the following line at the begining of the !Run file : if_task ArtWorks =present close |M Error Artworks is already loaded! Would mean that if Artworks is already loaded, and is mistakenly run again (say the Icon Bar was covered and the user did not realise), instead of a second copy being loaded, no second copy would be loaded, and an error message telling the user that Artworks was already loaded would appear. This is useful, as it saves the user : � Loading time - time taken to load the surplus copy (quite noticable for Artworks and Impression). � Memory - surplus copies take up unecassary memory. � Quiting time - The time and hassle of moving the icon bar to the front of the screen and quitting the program. It is worth noting that although there are some other programs around that do roughly the same job (such as those published on the August '96 Acorn User cover disc), If_Task is better than any I have seen, because it is 1. Faster, it is only 6 lines long. one I have seen is 101 lines long (If_Task is also low memory being so small) 2. The user can have a command carried out if the named Task is present, and if it isn't all on 1 line. To carry a command if a Task is not present, some need 4 lines E.g. : Set Paint$Active TRUE TaskEnsure Paint Set Paint$Active FALSE If �<Paint$Active>� = �TRUE� then filer_run Resources:$.Resources.Wimp.Sprites Unset Paint$Active 3. The user can carry out 2 commands as an output, all on one line. others may need 5 lines : Set Paint$Active TRUE TaskEnsure Paint Set Paint$Active FALSE If �<Paint$Active>� = �TRUE� then filer_run Resources:$.Resources.Wimp.Sprites If �<Paint$Active>� = �TRUE� then filer_run ADFS::HARDDISC4.$.diary Unset Paint$Active To activate the 'If_Task' component simply run 'RISCutils', with the 'If_Task' 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 'If_task' option set to 'N.'
00000000 0a 8f 20 49 66 5f 74 61 73 6b 20 3a 20 54 68 65 |.. If_task : The| 00000010 20 49 66 5f 54 61 73 6b 20 63 6f 6d 70 6f 6e 65 | If_Task compone| 00000020 6e 74 20 6f 66 20 52 49 53 43 75 74 69 6c 73 20 |nt of RISCutils | 00000030 70 72 6f 76 69 64 65 73 20 61 20 63 6f 6d 6d 61 |provides a comma| 00000040 6e 64 20 28 49 66 5f 54 61 73 6b 20 29 2c 20 74 |nd (If_Task ), t| 00000050 68 61 74 20 77 69 6c 6c 20 64 65 74 65 63 74 20 |hat will detect | 00000060 77 65 74 68 65 72 20 61 20 6e 61 6d 65 64 20 74 |wether a named t| 00000070 61 73 6b 20 2f 20 70 72 6f 67 72 61 6d 20 69 73 |ask / program is| 00000080 20 72 75 6e 6e 69 6e 67 20 6f 72 20 6e 6f 74 2c | running or not,| 00000090 20 61 6e 64 20 67 69 76 65 73 20 74 68 65 20 75 | and gives the u| 000000a0 73 65 72 20 74 68 65 20 6f 70 74 69 6f 6e 20 74 |ser the option t| 000000b0 6f 20 63 61 72 72 79 20 6f 75 74 20 61 20 63 6f |o carry out a co| 000000c0 6d 6d 61 6e 64 20 2f 20 63 6f 6d 6d 61 6e 64 73 |mmand / commands| 000000d0 20 28 67 69 76 65 6e 20 62 79 20 74 68 65 20 75 | (given by the u| 000000e0 73 65 72 29 20 69 66 20 74 68 65 20 54 61 73 6b |ser) if the Task| 000000f0 20 69 73 20 66 6f 75 6e 64 20 74 6f 20 62 65 20 | is found to be | 00000100 72 75 6e 6e 69 6e 67 2c 20 6f 72 20 69 74 20 69 |running, or it i| 00000110 73 20 66 6f 75 6e 64 20 74 6f 20 62 65 20 6e 6f |s found to be no| 00000120 74 20 72 75 6e 6e 69 6e 67 2c 20 6f 72 20 62 6f |t running, or bo| 00000130 74 68 2e 0a 0a 54 68 65 20 66 6f 72 6d 61 74 20 |th...The format | 00000140 6f 66 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 61 |of the command a| 00000150 6e 64 20 70 61 72 61 6d 65 74 65 72 73 20 69 73 |nd parameters is| 00000160 20 28 62 72 69 65 66 6c 79 29 20 61 73 20 66 6f | (briefly) as fo| 00000170 6c 6c 6f 77 73 20 3a 0a 0a 49 66 5f 54 61 73 6b |llows :..If_Task| 00000180 20 45 64 69 74 20 3d 70 72 65 73 65 6e 74 20 45 | Edit =present E| 00000190 43 48 4f 20 45 64 69 74 20 69 73 20 72 75 6e 6e |CHO Edit is runn| 000001a0 69 6e 67 20 0a 49 66 5f 54 61 73 6b 20 45 64 69 |ing .If_Task Edi| 000001b0 74 20 3d 6e 6f 74 70 72 65 73 65 6e 74 20 45 43 |t =notpresent EC| 000001c0 48 4f 20 45 64 69 74 20 69 73 20 6e 6f 74 20 72 |HO Edit is not r| 000001d0 75 6e 6e 69 6e 67 20 0a 0a 57 69 74 68 20 62 6f |unning ..With bo| 000001e0 74 68 20 6c 69 6e 65 73 20 61 62 6f 76 65 2c 20 |th lines above, | 000001f0 69 66 20 74 79 70 65 64 20 61 74 20 74 68 65 20 |if typed at the | 00000200 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 74 68 65 |command line the| 00000210 20 70 72 6f 67 72 61 6d 20 77 6f 75 6c 64 20 73 | program would s| 00000220 65 61 63 68 20 66 6f 72 20 61 20 54 61 73 6b 20 |each for a Task | 00000230 63 61 6c 6c 65 64 20 22 45 64 69 74 22 20 28 6e |called "Edit" (n| 00000240 6f 74 65 20 3a 20 63 61 73 65 20 73 65 6e 73 69 |ote : case sensi| 00000250 74 69 76 65 20 2d 20 63 68 65 63 6b 20 77 69 74 |tive - check wit| 00000260 68 20 74 61 73 6b 20 6d 61 6e 61 67 65 72 29 20 |h task manager) | 00000270 61 6e 64 20 69 66 20 69 74 20 77 61 73 20 66 6f |and if it was fo| 00000280 75 6e 64 20 74 6f 20 62 65 20 72 75 6e 6e 69 6e |und to be runnin| 00000290 67 20 3a 0a 2d 20 54 68 65 20 6f 75 74 70 75 74 |g :.- The output| 000002a0 20 66 72 6f 6d 20 74 68 65 20 31 73 74 20 6c 69 | from the 1st li| 000002b0 6e 65 20 77 6f 75 6c 64 20 62 65 20 74 68 61 74 |ne would be that| 000002c0 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 22 45 43 | the command "EC| 000002d0 48 4f 20 45 64 69 74 20 69 73 20 72 75 6e 6e 69 |HO Edit is runni| 000002e0 6e 67 22 20 77 6f 75 6c 64 20 62 65 20 63 61 72 |ng" would be car| 000002f0 72 69 65 64 20 6f 75 74 2e 0a 2d 20 54 68 65 20 |ried out..- The | 00000300 6f 75 74 70 75 74 20 66 72 6f 6d 20 74 68 65 20 |output from the | 00000310 32 6e 64 20 6c 69 6e 65 20 77 6f 75 6c 64 20 62 |2nd line would b| 00000320 65 20 74 68 61 74 20 6e 6f 20 63 6f 6d 6d 61 6e |e that no comman| 00000330 64 20 77 6f 75 6c 64 20 62 65 20 63 61 72 72 69 |d would be carri| 00000340 65 64 20 6f 75 74 2e 0a 0a 49 66 20 61 20 74 61 |ed out...If a ta| 00000350 73 6b 20 63 61 6c 6c 65 64 20 22 45 64 69 74 22 |sk called "Edit"| 00000360 20 69 73 20 66 6f 75 6e 64 20 74 6f 20 62 65 20 | is found to be | 00000370 72 75 6e 6e 69 6e 67 20 3a 0a 2d 20 54 68 65 20 |running :.- The | 00000380 6f 75 74 70 75 74 20 66 72 6f 6d 20 74 68 65 20 |output from the | 00000390 31 73 74 20 6c 69 6e 65 20 77 6f 75 6c 64 20 62 |1st line would b| 000003a0 65 20 74 68 61 74 20 6e 6f 20 63 6f 6d 6d 61 6e |e that no comman| 000003b0 64 20 77 6f 75 6c 64 20 62 65 20 63 61 72 72 69 |d would be carri| 000003c0 65 64 20 6f 75 74 2e 20 0a 2d 20 54 68 65 20 6f |ed out. .- The o| 000003d0 75 74 70 75 74 20 66 72 6f 6d 20 74 68 65 20 32 |utput from the 2| 000003e0 6e 64 20 6c 69 6e 65 20 77 6f 75 6c 64 20 62 65 |nd line would be| 000003f0 20 74 68 61 74 20 74 68 65 20 63 6f 6d 6d 61 6e | that the comman| 00000400 64 20 22 45 43 48 4f 20 45 64 69 74 20 69 73 20 |d "ECHO Edit is | 00000410 6e 6f 74 20 72 75 6e 6e 69 6e 67 22 20 77 6f 75 |not running" wou| 00000420 6c 64 20 62 65 20 63 61 72 72 69 65 64 20 6f 75 |ld be carried ou| 00000430 74 2e 0a 0a 4f 66 20 63 6f 75 72 73 65 20 61 6e |t...Of course an| 00000440 79 20 63 6f 6d 6d 61 6e 64 2c 20 6e 6f 74 20 6a |y command, not j| 00000450 75 73 74 20 74 68 65 20 27 45 43 48 4f 27 20 20 |ust the 'ECHO' | 00000460 63 6f 6d 6d 61 6e 64 20 63 6f 75 6c 64 20 62 65 |command could be| 00000470 20 63 61 72 72 69 65 64 20 6f 75 74 20 61 73 20 | carried out as | 00000480 61 6e 20 6f 75 74 70 75 74 2e 0a 54 68 65 20 27 |an output..The '| 00000490 3d 70 72 65 73 65 6e 74 27 20 61 6e 64 20 27 3d |=present' and '=| 000004a0 6e 6f 74 70 72 65 73 65 6e 74 27 20 70 61 72 61 |notpresent' para| 000004b0 6d 65 74 65 72 73 20 63 61 6e 20 62 65 20 63 6f |meters can be co| 000004c0 6d 62 69 6e 65 64 20 6f 6e 20 6f 6e 65 20 6c 69 |mbined on one li| 000004d0 6e 65 20 69 6e 20 61 6e 79 20 6f 72 64 65 72 2c |ne in any order,| 000004e0 20 61 6e 64 20 61 6c 73 6f 20 32 20 63 6f 6d 6d | and also 2 comm| 000004f0 61 6e 64 73 20 63 61 6e 20 62 65 20 63 61 72 72 |ands can be carr| 00000500 69 65 64 20 6f 75 74 20 61 73 20 61 6e 20 6f 75 |ied out as an ou| 00000510 74 70 75 74 20 66 6f 72 20 62 6f 74 68 20 73 74 |tput for both st| 00000520 61 74 65 73 20 62 79 20 74 79 70 69 6e 67 20 27 |ates by typing '| 00000530 7c 4d 27 20 61 66 74 65 72 20 74 68 65 20 66 69 ||M' after the fi| 00000540 72 73 74 20 63 6f 6d 6d 61 6e 64 2c 20 61 6e 64 |rst command, and| 00000550 20 74 68 65 6e 20 65 6e 74 65 72 69 6e 67 20 74 | then entering t| 00000560 68 65 20 32 6e 64 20 63 6f 6d 6d 61 6e 64 2e 20 |he 2nd command. | 00000570 53 6f 20 69 66 20 74 68 65 20 75 73 65 72 20 74 |So if the user t| 00000580 79 70 65 64 20 61 74 20 74 68 65 20 63 6f 6d 6d |yped at the comm| 00000590 61 6e 64 20 6c 69 6e 65 20 3a 0a 0a 49 66 5f 54 |and line :..If_T| 000005a0 61 73 6b 20 45 64 69 74 20 3d 70 72 65 73 65 6e |ask Edit =presen| 000005b0 74 20 45 43 48 4f 20 45 64 69 74 20 69 73 20 70 |t ECHO Edit is p| 000005c0 72 65 73 65 6e 74 20 28 31 29 20 7c 4d 20 45 43 |resent (1) |M EC| 000005d0 48 4f 20 20 45 64 69 74 20 69 73 20 70 72 65 73 |HO Edit is pres| 000005e0 65 6e 74 20 28 32 29 20 3d 6e 6f 74 70 72 65 73 |ent (2) =notpres| 000005f0 65 6e 74 20 45 43 48 4f 20 45 64 69 74 20 69 73 |ent ECHO Edit is| 00000600 20 6e 6f 74 20 70 72 65 73 65 6e 74 20 28 31 29 | not present (1)| 00000610 20 7c 4d 20 45 43 48 4f 20 45 64 69 74 20 69 73 | |M ECHO Edit is| 00000620 20 6e 6f 74 20 70 72 65 73 65 6e 74 20 28 32 29 | not present (2)| 00000630 20 0a 20 0a 2d 20 49 66 20 45 64 69 74 20 77 61 | . .- If Edit wa| 00000640 73 20 72 75 6e 6e 69 6e 67 20 61 74 20 74 68 65 |s running at the| 00000650 20 74 69 6d 65 20 74 68 65 20 63 6f 6d 6d 61 6e | time the comman| 00000660 64 20 77 61 73 20 69 73 73 75 65 64 2c 20 74 68 |d was issued, th| 00000670 65 20 63 6f 6d 6d 61 6e 64 73 20 22 45 43 48 4f |e commands "ECHO| 00000680 20 45 64 69 74 20 69 73 20 70 72 65 73 65 6e 74 | Edit is present| 00000690 20 28 31 29 22 20 61 6e 64 20 22 45 43 48 4f 20 | (1)" and "ECHO | 000006a0 45 64 69 74 20 69 73 20 70 72 65 73 65 6e 74 20 |Edit is present | 000006b0 28 32 29 22 20 77 6f 75 6c 64 20 62 65 20 63 61 |(2)" would be ca| 000006c0 72 72 69 65 64 20 6f 75 74 2e 0a 2d 20 49 66 20 |rried out..- If | 000006d0 45 64 69 74 20 77 61 73 20 6e 6f 74 20 72 75 6e |Edit was not run| 000006e0 6e 69 6e 67 20 61 74 20 74 68 65 20 74 69 6d 65 |ning at the time| 000006f0 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 77 61 73 | the command was| 00000700 20 69 73 73 75 65 64 2c 20 74 68 65 20 63 6f 6d | issued, the com| 00000710 6d 61 6e 64 73 20 22 45 43 48 4f 20 45 64 69 74 |mands "ECHO Edit| 00000720 20 69 73 20 6e 6f 74 20 70 72 65 73 65 6e 74 20 | is not present | 00000730 28 31 29 22 20 61 6e 64 20 22 45 43 48 4f 20 45 |(1)" and "ECHO E| 00000740 64 69 74 20 69 73 20 6e 6f 74 20 70 72 65 73 65 |dit is not prese| 00000750 6e 74 20 28 32 29 22 20 77 6f 75 6c 64 20 62 65 |nt (2)" would be| 00000760 20 63 61 72 72 69 65 64 20 6f 75 74 2e 0a 0a 54 | carried out...T| 00000770 68 65 20 70 72 6f 67 72 61 6d 20 69 73 20 66 61 |he program is fa| 00000780 69 72 6c 79 20 69 6e 74 65 6c 6c 69 67 65 6e 74 |irly intelligent| 00000790 2c 20 61 6e 64 20 77 69 6c 6c 20 67 69 76 65 20 |, and will give | 000007a0 74 68 65 20 75 73 65 72 20 61 20 6e 75 6d 62 65 |the user a numbe| 000007b0 72 20 6f 66 20 64 69 66 66 65 72 65 6e 74 20 45 |r of different E| 000007c0 72 72 6f 72 20 6d 65 73 73 61 67 65 73 20 69 66 |rror messages if| 000007d0 20 74 68 65 20 66 6f 72 6d 61 74 20 69 73 20 6e | the format is n| 000007e0 6f 74 20 61 64 68 65 72 65 64 20 74 6f 20 63 6f |ot adhered to co| 000007f0 72 72 65 63 74 6c 79 2e 20 4e 6f 74 65 20 74 68 |rrectly. Note th| 00000800 65 72 65 20 6d 75 73 74 20 62 65 20 61 20 73 70 |ere must be a sp| 00000810 61 63 65 3a 0a 31 2e 20 41 66 74 65 72 20 74 68 |ace:.1. After th| 00000820 65 20 63 6f 6d 6d 61 6e 64 20 69 74 73 65 6c 66 |e command itself| 00000830 20 22 49 66 5f 54 61 73 6b 22 2c 20 0a 32 2e 20 | "If_Task", .2. | 00000840 42 65 74 77 65 65 6e 20 74 68 65 20 54 61 73 6b |Between the Task| 00000850 20 6e 61 6d 65 20 61 6e 64 20 74 68 65 20 22 3d | name and the "=| 00000860 70 72 65 73 65 6e 74 22 20 6f 72 20 22 3d 6e 6f |present" or "=no| 00000870 74 70 72 65 73 65 6e 74 22 20 70 61 72 61 6d 65 |tpresent" parame| 00000880 74 65 72 20 2d 20 75 73 69 6e 67 20 22 45 64 69 |ter - using "Edi| 00000890 74 3d 6e 6f 74 70 72 65 73 65 6e 74 20 22 20 77 |t=notpresent " w| 000008a0 6f 75 6c 64 20 6d 61 6b 65 20 74 68 65 20 70 72 |ould make the pr| 000008b0 6f 67 72 61 6d 20 6c 6f 6f 6b 20 66 6f 72 20 61 |ogram look for a| 000008c0 20 54 61 73 6b 20 63 61 6c 6c 65 64 20 22 45 64 | Task called "Ed| 000008d0 69 74 3d 6e 6f 74 70 72 65 73 65 6e 74 20 22 2e |it=notpresent ".| 000008e0 0a 33 2e 20 42 65 74 77 65 65 6e 20 74 68 65 20 |.3. Between the | 000008f0 65 6e 64 20 6f 66 20 61 20 70 61 72 61 6d 65 74 |end of a paramet| 00000900 65 72 20 77 6f 72 64 20 28 3d 70 72 65 73 65 6e |er word (=presen| 00000910 74 20 6f 72 20 3d 6e 6f 74 70 72 65 73 65 6e 74 |t or =notpresent| 00000920 29 20 61 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e |) and the comman| 00000930 64 20 74 6f 20 62 65 20 63 61 72 72 69 65 64 20 |d to be carried | 00000940 6f 75 74 20 66 6f 72 20 74 68 61 74 20 73 74 61 |out for that sta| 00000950 74 65 2e 20 45 2e 67 2e 20 74 68 65 20 75 73 65 |te. E.g. the use| 00000960 72 20 6d 75 73 74 20 65 6e 74 65 72 20 22 3d 70 |r must enter "=p| 00000970 72 65 73 65 6e 74 20 45 43 48 4f 20 45 64 69 74 |resent ECHO Edit| 00000980 20 69 73 20 72 75 6e 6e 69 6e 67 22 2c 20 6e 6f | is running", no| 00000990 74 20 22 3d 70 72 65 73 65 6e 74 45 43 48 4f 20 |t "=presentECHO | 000009a0 45 64 69 74 20 69 73 20 72 75 6e 6e 69 6e 67 22 |Edit is running"| 000009b0 2e 0a 0a 54 68 65 72 65 20 61 72 65 20 61 20 6c |...There are a l| 000009c0 61 72 67 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 |arge number of p| 000009d0 6f 73 73 69 62 6c 65 20 75 73 65 73 20 66 6f 72 |ossible uses for| 000009e0 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 62 | this command, b| 000009f0 75 74 20 74 68 65 20 6d 61 69 6e 20 6f 6e 65 20 |ut the main one | 00000a00 49 20 63 61 6e 20 74 68 69 6e 6b 20 6f 66 20 69 |I can think of i| 00000a10 73 20 74 6f 20 70 72 65 76 65 6e 74 20 41 70 70 |s to prevent App| 00000a20 6c 69 63 61 74 69 6f 6e 73 20 74 68 61 74 20 64 |lications that d| 00000a30 6f 20 6e 6f 74 20 6e 65 65 64 20 74 6f 20 62 65 |o not need to be| 00000a40 20 6c 6f 61 64 65 64 20 6d 6f 72 65 20 74 68 61 | loaded more tha| 00000a50 6e 20 6f 6e 63 65 20 28 69 2e 65 2e 20 6f 6e 65 |n once (i.e. one| 00000a60 73 20 74 68 61 74 20 62 79 20 75 73 69 6e 67 20 |s that by using | 00000a70 61 20 73 69 6e 67 6c 65 20 63 6f 70 79 20 6f 66 |a single copy of| 00000a80 20 74 68 65 20 70 72 6f 67 72 61 6d 20 63 61 6e | the program can| 00000a90 20 72 65 61 64 20 2f 20 64 69 73 70 6c 61 79 20 | read / display | 00000aa0 2f 20 70 6c 61 79 20 65 74 63 2c 20 6d 6f 72 65 |/ play etc, more| 00000ab0 20 74 68 61 6e 20 6f 6e 65 20 66 69 6c 65 20 61 | than one file a| 00000ac0 74 20 61 20 74 69 6d 65 20 45 2e 67 2e 20 45 64 |t a time E.g. Ed| 00000ad0 69 74 2c 20 50 61 69 6e 74 2c 20 61 6e 64 20 44 |it, Paint, and D| 00000ae0 72 61 77 29 20 66 72 6f 6d 20 62 65 69 6e 67 20 |raw) from being | 00000af0 61 62 6c 65 20 74 6f 20 64 6f 20 73 6f 2e 0a 54 |able to do so..T| 00000b00 68 69 73 20 63 61 6e 20 62 65 20 64 6f 6e 65 20 |his can be done | 00000b10 62 79 20 65 6e 74 65 72 69 6e 67 20 61 20 73 69 |by entering a si| 00000b20 6e 67 6c 65 20 6c 69 6e 65 20 61 74 20 74 68 65 |ngle line at the| 00000b30 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 74 68 65 | begining of the| 00000b40 20 64 65 73 69 72 65 64 20 61 70 70 6c 69 63 61 | desired applica| 00000b50 74 69 6f 6e 27 73 20 21 52 75 6e 20 66 69 6c 65 |tion's !Run file| 00000b60 2e 20 45 2e 67 2e 20 66 6f 72 20 41 72 74 77 6f |. E.g. for Artwo| 00000b70 72 6b 73 2c 20 65 6e 74 65 72 69 6e 67 20 74 68 |rks, entering th| 00000b80 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6c 69 6e 65 |e following line| 00000b90 20 61 74 20 74 68 65 20 62 65 67 69 6e 69 6e 67 | at the begining| 00000ba0 20 6f 66 20 74 68 65 20 21 52 75 6e 20 66 69 6c | of the !Run fil| 00000bb0 65 20 3a 0a 0a 69 66 5f 74 61 73 6b 20 41 72 74 |e :..if_task Art| 00000bc0 57 6f 72 6b 73 20 3d 70 72 65 73 65 6e 74 20 63 |Works =present c| 00000bd0 6c 6f 73 65 20 7c 4d 20 45 72 72 6f 72 20 41 72 |lose |M Error Ar| 00000be0 74 77 6f 72 6b 73 20 69 73 20 61 6c 72 65 61 64 |tworks is alread| 00000bf0 79 20 6c 6f 61 64 65 64 21 0a 0a 57 6f 75 6c 64 |y loaded!..Would| 00000c00 20 6d 65 61 6e 20 74 68 61 74 20 69 66 20 41 72 | mean that if Ar| 00000c10 74 77 6f 72 6b 73 20 69 73 20 61 6c 72 65 61 64 |tworks is alread| 00000c20 79 20 6c 6f 61 64 65 64 2c 20 61 6e 64 20 69 73 |y loaded, and is| 00000c30 20 6d 69 73 74 61 6b 65 6e 6c 79 20 72 75 6e 20 | mistakenly run | 00000c40 61 67 61 69 6e 20 28 73 61 79 20 74 68 65 20 49 |again (say the I| 00000c50 63 6f 6e 20 42 61 72 20 77 61 73 20 63 6f 76 65 |con Bar was cove| 00000c60 72 65 64 20 61 6e 64 20 74 68 65 20 75 73 65 72 |red and the user| 00000c70 20 64 69 64 20 6e 6f 74 20 72 65 61 6c 69 73 65 | did not realise| 00000c80 29 2c 20 69 6e 73 74 65 61 64 20 6f 66 20 61 20 |), instead of a | 00000c90 73 65 63 6f 6e 64 20 63 6f 70 79 20 62 65 69 6e |second copy bein| 00000ca0 67 20 6c 6f 61 64 65 64 2c 20 6e 6f 20 73 65 63 |g loaded, no sec| 00000cb0 6f 6e 64 20 63 6f 70 79 20 77 6f 75 6c 64 20 62 |ond copy would b| 00000cc0 65 20 6c 6f 61 64 65 64 2c 20 61 6e 64 20 61 6e |e loaded, and an| 00000cd0 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 74 | error message t| 00000ce0 65 6c 6c 69 6e 67 20 74 68 65 20 75 73 65 72 20 |elling the user | 00000cf0 74 68 61 74 20 41 72 74 77 6f 72 6b 73 20 77 61 |that Artworks wa| 00000d00 73 20 61 6c 72 65 61 64 79 20 6c 6f 61 64 65 64 |s already loaded| 00000d10 20 77 6f 75 6c 64 20 61 70 70 65 61 72 2e 0a 0a | would appear...| 00000d20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 2c 20 |This is useful, | 00000d30 61 73 20 69 74 20 73 61 76 65 73 20 74 68 65 20 |as it saves the | 00000d40 75 73 65 72 20 3a 0a 0a 8f 20 4c 6f 61 64 69 6e |user :... Loadin| 00000d50 67 20 74 69 6d 65 20 2d 20 74 69 6d 65 20 74 61 |g time - time ta| 00000d60 6b 65 6e 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 |ken to load the | 00000d70 73 75 72 70 6c 75 73 20 63 6f 70 79 20 28 71 75 |surplus copy (qu| 00000d80 69 74 65 20 6e 6f 74 69 63 61 62 6c 65 20 66 6f |ite noticable fo| 00000d90 72 20 41 72 74 77 6f 72 6b 73 20 61 6e 64 20 49 |r Artworks and I| 00000da0 6d 70 72 65 73 73 69 6f 6e 29 2e 0a 8f 20 4d 65 |mpression)... Me| 00000db0 6d 6f 72 79 20 2d 20 73 75 72 70 6c 75 73 20 63 |mory - surplus c| 00000dc0 6f 70 69 65 73 20 74 61 6b 65 20 75 70 20 75 6e |opies take up un| 00000dd0 65 63 61 73 73 61 72 79 20 6d 65 6d 6f 72 79 2e |ecassary memory.| 00000de0 0a 8f 20 51 75 69 74 69 6e 67 20 74 69 6d 65 20 |.. Quiting time | 00000df0 2d 20 54 68 65 20 74 69 6d 65 20 61 6e 64 20 68 |- The time and h| 00000e00 61 73 73 6c 65 20 6f 66 20 6d 6f 76 69 6e 67 20 |assle of moving | 00000e10 74 68 65 20 69 63 6f 6e 20 62 61 72 20 74 6f 20 |the icon bar to | 00000e20 74 68 65 20 66 72 6f 6e 74 20 6f 66 20 74 68 65 |the front of the| 00000e30 20 73 63 72 65 65 6e 20 61 6e 64 20 71 75 69 74 | screen and quit| 00000e40 74 69 6e 67 20 74 68 65 20 70 72 6f 67 72 61 6d |ting the program| 00000e50 2e 0a 0a 49 74 20 69 73 20 77 6f 72 74 68 20 6e |...It is worth n| 00000e60 6f 74 69 6e 67 20 74 68 61 74 20 61 6c 74 68 6f |oting that altho| 00000e70 75 67 68 20 74 68 65 72 65 20 61 72 65 20 73 6f |ugh there are so| 00000e80 6d 65 20 6f 74 68 65 72 20 70 72 6f 67 72 61 6d |me other program| 00000e90 73 20 61 72 6f 75 6e 64 20 74 68 61 74 20 64 6f |s around that do| 00000ea0 20 72 6f 75 67 68 6c 79 20 74 68 65 20 73 61 6d | roughly the sam| 00000eb0 65 20 6a 6f 62 20 28 73 75 63 68 20 61 73 20 74 |e job (such as t| 00000ec0 68 6f 73 65 20 70 75 62 6c 69 73 68 65 64 20 6f |hose published o| 00000ed0 6e 20 74 68 65 20 41 75 67 75 73 74 20 27 39 36 |n the August '96| 00000ee0 20 41 63 6f 72 6e 20 55 73 65 72 20 63 6f 76 65 | Acorn User cove| 00000ef0 72 20 64 69 73 63 29 2c 20 49 66 5f 54 61 73 6b |r disc), If_Task| 00000f00 20 69 73 20 62 65 74 74 65 72 20 74 68 61 6e 20 | is better than | 00000f10 61 6e 79 20 49 20 68 61 76 65 20 73 65 65 6e 2c |any I have seen,| 00000f20 20 62 65 63 61 75 73 65 20 69 74 20 69 73 0a 0a | because it is..| 00000f30 31 2e 20 46 61 73 74 65 72 2c 20 69 74 20 69 73 |1. Faster, it is| 00000f40 20 6f 6e 6c 79 20 36 20 6c 69 6e 65 73 20 6c 6f | only 6 lines lo| 00000f50 6e 67 2e 20 6f 6e 65 20 49 20 68 61 76 65 20 73 |ng. one I have s| 00000f60 65 65 6e 20 69 73 20 31 30 31 20 6c 69 6e 65 73 |een is 101 lines| 00000f70 20 6c 6f 6e 67 20 28 49 66 5f 54 61 73 6b 20 69 | long (If_Task i| 00000f80 73 20 61 6c 73 6f 20 6c 6f 77 20 6d 65 6d 6f 72 |s also low memor| 00000f90 79 20 62 65 69 6e 67 20 73 6f 20 73 6d 61 6c 6c |y being so small| 00000fa0 29 0a 0a 32 2e 20 54 68 65 20 75 73 65 72 20 63 |)..2. The user c| 00000fb0 61 6e 20 68 61 76 65 20 61 20 63 6f 6d 6d 61 6e |an have a comman| 00000fc0 64 20 63 61 72 72 69 65 64 20 6f 75 74 20 69 66 |d carried out if| 00000fd0 20 74 68 65 20 6e 61 6d 65 64 20 54 61 73 6b 20 | the named Task | 00000fe0 69 73 20 70 72 65 73 65 6e 74 2c 20 61 6e 64 20 |is present, and | 00000ff0 69 66 20 69 74 20 69 73 6e 27 74 20 61 6c 6c 20 |if it isn't all | 00001000 6f 6e 20 31 20 6c 69 6e 65 2e 20 54 6f 20 63 61 |on 1 line. To ca| 00001010 72 72 79 20 61 20 63 6f 6d 6d 61 6e 64 20 69 66 |rry a command if| 00001020 20 61 20 54 61 73 6b 20 69 73 20 6e 6f 74 20 70 | a Task is not p| 00001030 72 65 73 65 6e 74 2c 20 73 6f 6d 65 20 6e 65 65 |resent, some nee| 00001040 64 20 34 20 6c 69 6e 65 73 20 45 2e 67 2e 20 3a |d 4 lines E.g. :| 00001050 0a 0a 53 65 74 20 50 61 69 6e 74 24 41 63 74 69 |..Set Paint$Acti| 00001060 76 65 20 54 52 55 45 0a 54 61 73 6b 45 6e 73 75 |ve TRUE.TaskEnsu| 00001070 72 65 20 50 61 69 6e 74 20 53 65 74 20 50 61 69 |re Paint Set Pai| 00001080 6e 74 24 41 63 74 69 76 65 20 46 41 4c 53 45 0a |nt$Active FALSE.| 00001090 49 66 20 94 3c 50 61 69 6e 74 24 41 63 74 69 76 |If .<Paint$Activ| 000010a0 65 3e 95 20 3d 20 94 54 52 55 45 95 20 74 68 65 |e>. = .TRUE. the| 000010b0 6e 20 66 69 6c 65 72 5f 72 75 6e 20 52 65 73 6f |n filer_run Reso| 000010c0 75 72 63 65 73 3a 24 2e 52 65 73 6f 75 72 63 65 |urces:$.Resource| 000010d0 73 2e 57 69 6d 70 2e 53 70 72 69 74 65 73 0a 55 |s.Wimp.Sprites.U| 000010e0 6e 73 65 74 20 50 61 69 6e 74 24 41 63 74 69 76 |nset Paint$Activ| 000010f0 65 0a 0a 33 2e 20 54 68 65 20 75 73 65 72 20 63 |e..3. The user c| 00001100 61 6e 20 63 61 72 72 79 20 6f 75 74 20 32 20 63 |an carry out 2 c| 00001110 6f 6d 6d 61 6e 64 73 20 61 73 20 61 6e 20 6f 75 |ommands as an ou| 00001120 74 70 75 74 2c 20 61 6c 6c 20 6f 6e 20 6f 6e 65 |tput, all on one| 00001130 20 6c 69 6e 65 2e 20 6f 74 68 65 72 73 20 6d 61 | line. others ma| 00001140 79 20 6e 65 65 64 20 35 20 6c 69 6e 65 73 20 3a |y need 5 lines :| 00001150 0a 0a 53 65 74 20 50 61 69 6e 74 24 41 63 74 69 |..Set Paint$Acti| 00001160 76 65 20 54 52 55 45 0a 54 61 73 6b 45 6e 73 75 |ve TRUE.TaskEnsu| 00001170 72 65 20 50 61 69 6e 74 20 53 65 74 20 50 61 69 |re Paint Set Pai| 00001180 6e 74 24 41 63 74 69 76 65 20 46 41 4c 53 45 0a |nt$Active FALSE.| 00001190 49 66 20 94 3c 50 61 69 6e 74 24 41 63 74 69 76 |If .<Paint$Activ| 000011a0 65 3e 95 20 3d 20 94 54 52 55 45 95 20 74 68 65 |e>. = .TRUE. the| 000011b0 6e 20 66 69 6c 65 72 5f 72 75 6e 20 52 65 73 6f |n filer_run Reso| 000011c0 75 72 63 65 73 3a 24 2e 52 65 73 6f 75 72 63 65 |urces:$.Resource| 000011d0 73 2e 57 69 6d 70 2e 53 70 72 69 74 65 73 0a 49 |s.Wimp.Sprites.I| 000011e0 66 20 94 3c 50 61 69 6e 74 24 41 63 74 69 76 65 |f .<Paint$Active| 000011f0 3e 95 20 3d 20 94 54 52 55 45 95 20 74 68 65 6e |>. = .TRUE. then| 00001200 20 66 69 6c 65 72 5f 72 75 6e 20 41 44 46 53 3a | filer_run ADFS:| 00001210 3a 48 41 52 44 44 49 53 43 34 2e 24 2e 64 69 61 |:HARDDISC4.$.dia| 00001220 72 79 0a 55 6e 73 65 74 20 50 61 69 6e 74 24 41 |ry.Unset Paint$A| 00001230 63 74 69 76 65 0a 0a 54 6f 20 61 63 74 69 76 61 |ctive..To activa| 00001240 74 65 20 74 68 65 20 27 49 66 5f 54 61 73 6b 27 |te the 'If_Task'| 00001250 20 63 6f 6d 70 6f 6e 65 6e 74 20 73 69 6d 70 6c | component simpl| 00001260 79 20 72 75 6e 20 27 52 49 53 43 75 74 69 6c 73 |y run 'RISCutils| 00001270 27 2c 20 77 69 74 68 20 74 68 65 20 27 49 66 5f |', with the 'If_| 00001280 54 61 73 6b 27 20 6f 70 74 69 6f 6e 20 69 6e 20 |Task' option in | 00001290 52 49 53 43 75 74 69 6c 27 73 20 21 52 75 6e 20 |RISCutil's !Run | 000012a0 66 69 6c 65 20 73 65 74 20 74 6f 20 27 59 27 2e |file set to 'Y'.| 000012b0 20 54 6f 20 64 65 2d 61 63 74 69 76 61 74 65 20 | To de-activate | 000012c0 69 74 20 72 75 6e 20 74 68 65 20 66 69 6c 65 20 |it run the file | 000012d0 52 49 53 43 75 74 69 6c 73 2e 55 73 65 72 5f 41 |RISCutils.User_A| 000012e0 72 65 61 2e 46 69 6c 65 73 2e 52 65 6d 6f 76 65 |rea.Files.Remove| 000012f0 2c 20 61 6e 64 20 72 75 6e 20 27 52 49 53 43 75 |, and run 'RISCu| 00001300 74 69 6c 73 27 2c 20 77 69 74 68 20 74 68 65 20 |tils', with the | 00001310 27 49 66 5f 74 61 73 6b 27 20 6f 70 74 69 6f 6e |'If_task' option| 00001320 20 73 65 74 20 74 6f 20 27 4e 2e 27 20 20 20 20 | set to 'N.' | 00001330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001350 20 20 20 0a | .| 00001354