Home » Archimedes archive » Acorn User » AU 1996-08.adf » Regulars » StarInfo/Kemp/TaskEnsure/!Readme

StarInfo/Kemp/TaskEnsure/!Readme

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 1996-08.adf » Regulars
Filename: StarInfo/Kemp/TaskEnsure/!Readme
Read OK:
File size: 0BEA bytes
Load address: 0000
Exec address: 0000
File contents
-------------------------------------------------------------------------------

        TaskEnsure

                                                        by Andrew Kemp

                                                        � KCE Software, 1996

-------------------------------------------------------------------------------


Purpose
-------
        TaskEnsure is a little utility for your library directory, designed 
        for use in Obey files.

        Basically, it provides a task name equivalent of '*RMEnsure'.  This
        allows you to create Obey files that execute commands conditionally
        depending on whether or not a given task is running.

        Thus you might have an Obey file to set your machine up for, say,
        writing letters, that will only run your word processor if it is not
        already running.

        TaskEnsure could also be envoked from an application's !Run file, to
        prevent more than one copy from being loaded.


Usage
-----
        Syntax: *TaskEnsure <task name> <*command>

        Where:

          'task name' is the name of the task to be checked for, as it appears
          in the Task Manager window - note that this _is_ case sensitive.

          '*command' is a command to be executed if the task is not active.

        If the task name consists of more than one word, it should be enclosed
        in quotes; for example,

          *TaskEnsure "ADFS Filer" ...

        The command does not need to be in quotes, even if it is more than one
        word - everything after the task name is just passed straight to
        OS_CLI.

        See the Obey file 'Examples' for some examples of how to use
        TaskEnsure.


Licence
-------
        TaskEnsure is freeware.  By this I mean that it may be freely
        distributed as long as this !Readme file and the obey file 'Examples'
        accompany it, and nothing is modified.

        If you have the source code to TaskEnsure, please do not distribute it
        separately from the other files, and do not distribute modified
        versions.  If you want to use bits of the source in your own program,
        please remember to acknowledge my contribution! :)

        TaskEnsure is supplied "as is", and without guarantee.  Please note
        that the author accepts no responsibility for anything nasty that
        happens as a result of the existence of TaskEnsure or its associated
        files - you use them entirely at your own risk.

        Anyone wanting to distribute TaskEnsure on a large scale should contact
        me first, to make sure they have the latest version.


Bugs
----
        Should you find any, it would be helpful if you could let me know what
        they are.  Until mid June this year (1996) I can be contacted at
        ajwk100@hermes.cam.ac.uk.  Otherwise my postal address is:

                23 Conifer Close
                Church Crookham
                Fleet
                Hants
                GU13 0LR

        Comments and suggestions are also welcome.
00000000  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000040  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |---------------.|
00000050  0a 20 20 20 20 20 20 20  20 54 61 73 6b 45 6e 73  |.        TaskEns|
00000060  75 72 65 0a 0a 20 20 20  20 20 20 20 20 20 20 20  |ure..           |
00000070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000090  20 20 20 20 20 20 20 20  20 20 20 20 20 62 79 20  |             by |
000000a0  41 6e 64 72 65 77 20 4b  65 6d 70 0a 0a 20 20 20  |Andrew Kemp..   |
000000b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000000e0  20 20 20 20 20 a9 20 4b  43 45 20 53 6f 66 74 77  |     . KCE Softw|
000000f0  61 72 65 2c 20 31 39 39  36 0a 0a 2d 2d 2d 2d 2d  |are, 1996..-----|
00000100  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000140  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0a 0a 0a 50 75 72  |----------...Pur|
00000150  70 6f 73 65 0a 2d 2d 2d  2d 2d 2d 2d 0a 20 20 20  |pose.-------.   |
00000160  20 20 20 20 20 54 61 73  6b 45 6e 73 75 72 65 20  |     TaskEnsure |
00000170  69 73 20 61 20 6c 69 74  74 6c 65 20 75 74 69 6c  |is a little util|
00000180  69 74 79 20 66 6f 72 20  79 6f 75 72 20 6c 69 62  |ity for your lib|
00000190  72 61 72 79 20 64 69 72  65 63 74 6f 72 79 2c 20  |rary directory, |
000001a0  64 65 73 69 67 6e 65 64  20 0a 20 20 20 20 20 20  |designed .      |
000001b0  20 20 66 6f 72 20 75 73  65 20 69 6e 20 4f 62 65  |  for use in Obe|
000001c0  79 20 66 69 6c 65 73 2e  0a 0a 20 20 20 20 20 20  |y files...      |
000001d0  20 20 42 61 73 69 63 61  6c 6c 79 2c 20 69 74 20  |  Basically, it |
000001e0  70 72 6f 76 69 64 65 73  20 61 20 74 61 73 6b 20  |provides a task |
000001f0  6e 61 6d 65 20 65 71 75  69 76 61 6c 65 6e 74 20  |name equivalent |
00000200  6f 66 20 27 2a 52 4d 45  6e 73 75 72 65 27 2e 20  |of '*RMEnsure'. |
00000210  20 54 68 69 73 0a 20 20  20 20 20 20 20 20 61 6c  | This.        al|
00000220  6c 6f 77 73 20 79 6f 75  20 74 6f 20 63 72 65 61  |lows you to crea|
00000230  74 65 20 4f 62 65 79 20  66 69 6c 65 73 20 74 68  |te Obey files th|
00000240  61 74 20 65 78 65 63 75  74 65 20 63 6f 6d 6d 61  |at execute comma|
00000250  6e 64 73 20 63 6f 6e 64  69 74 69 6f 6e 61 6c 6c  |nds conditionall|
00000260  79 0a 20 20 20 20 20 20  20 20 64 65 70 65 6e 64  |y.        depend|
00000270  69 6e 67 20 6f 6e 20 77  68 65 74 68 65 72 20 6f  |ing on whether o|
00000280  72 20 6e 6f 74 20 61 20  67 69 76 65 6e 20 74 61  |r not a given ta|
00000290  73 6b 20 69 73 20 72 75  6e 6e 69 6e 67 2e 0a 0a  |sk is running...|
000002a0  20 20 20 20 20 20 20 20  54 68 75 73 20 79 6f 75  |        Thus you|
000002b0  20 6d 69 67 68 74 20 68  61 76 65 20 61 6e 20 4f  | might have an O|
000002c0  62 65 79 20 66 69 6c 65  20 74 6f 20 73 65 74 20  |bey file to set |
000002d0  79 6f 75 72 20 6d 61 63  68 69 6e 65 20 75 70 20  |your machine up |
000002e0  66 6f 72 2c 20 73 61 79  2c 0a 20 20 20 20 20 20  |for, say,.      |
000002f0  20 20 77 72 69 74 69 6e  67 20 6c 65 74 74 65 72  |  writing letter|
00000300  73 2c 20 74 68 61 74 20  77 69 6c 6c 20 6f 6e 6c  |s, that will onl|
00000310  79 20 72 75 6e 20 79 6f  75 72 20 77 6f 72 64 20  |y run your word |
00000320  70 72 6f 63 65 73 73 6f  72 20 69 66 20 69 74 20  |processor if it |
00000330  69 73 20 6e 6f 74 0a 20  20 20 20 20 20 20 20 61  |is not.        a|
00000340  6c 72 65 61 64 79 20 72  75 6e 6e 69 6e 67 2e 0a  |lready running..|
00000350  0a 20 20 20 20 20 20 20  20 54 61 73 6b 45 6e 73  |.        TaskEns|
00000360  75 72 65 20 63 6f 75 6c  64 20 61 6c 73 6f 20 62  |ure could also b|
00000370  65 20 65 6e 76 6f 6b 65  64 20 66 72 6f 6d 20 61  |e envoked from a|
00000380  6e 20 61 70 70 6c 69 63  61 74 69 6f 6e 27 73 20  |n application's |
00000390  21 52 75 6e 20 66 69 6c  65 2c 20 74 6f 0a 20 20  |!Run file, to.  |
000003a0  20 20 20 20 20 20 70 72  65 76 65 6e 74 20 6d 6f  |      prevent mo|
000003b0  72 65 20 74 68 61 6e 20  6f 6e 65 20 63 6f 70 79  |re than one copy|
000003c0  20 66 72 6f 6d 20 62 65  69 6e 67 20 6c 6f 61 64  | from being load|
000003d0  65 64 2e 0a 0a 0a 55 73  61 67 65 0a 2d 2d 2d 2d  |ed....Usage.----|
000003e0  2d 0a 20 20 20 20 20 20  20 20 53 79 6e 74 61 78  |-.        Syntax|
000003f0  3a 20 2a 54 61 73 6b 45  6e 73 75 72 65 20 3c 74  |: *TaskEnsure <t|
00000400  61 73 6b 20 6e 61 6d 65  3e 20 3c 2a 63 6f 6d 6d  |ask name> <*comm|
00000410  61 6e 64 3e 0a 0a 20 20  20 20 20 20 20 20 57 68  |and>..        Wh|
00000420  65 72 65 3a 0a 0a 20 20  20 20 20 20 20 20 20 20  |ere:..          |
00000430  27 74 61 73 6b 20 6e 61  6d 65 27 20 69 73 20 74  |'task name' is t|
00000440  68 65 20 6e 61 6d 65 20  6f 66 20 74 68 65 20 74  |he name of the t|
00000450  61 73 6b 20 74 6f 20 62  65 20 63 68 65 63 6b 65  |ask to be checke|
00000460  64 20 66 6f 72 2c 20 61  73 20 69 74 20 61 70 70  |d for, as it app|
00000470  65 61 72 73 0a 20 20 20  20 20 20 20 20 20 20 69  |ears.          i|
00000480  6e 20 74 68 65 20 54 61  73 6b 20 4d 61 6e 61 67  |n the Task Manag|
00000490  65 72 20 77 69 6e 64 6f  77 20 2d 20 6e 6f 74 65  |er window - note|
000004a0  20 74 68 61 74 20 74 68  69 73 20 5f 69 73 5f 20  | that this _is_ |
000004b0  63 61 73 65 20 73 65 6e  73 69 74 69 76 65 2e 0a  |case sensitive..|
000004c0  0a 20 20 20 20 20 20 20  20 20 20 27 2a 63 6f 6d  |.          '*com|
000004d0  6d 61 6e 64 27 20 69 73  20 61 20 63 6f 6d 6d 61  |mand' is a comma|
000004e0  6e 64 20 74 6f 20 62 65  20 65 78 65 63 75 74 65  |nd to be execute|
000004f0  64 20 69 66 20 74 68 65  20 74 61 73 6b 20 69 73  |d if the task is|
00000500  20 6e 6f 74 20 61 63 74  69 76 65 2e 0a 0a 20 20  | not active...  |
00000510  20 20 20 20 20 20 49 66  20 74 68 65 20 74 61 73  |      If the tas|
00000520  6b 20 6e 61 6d 65 20 63  6f 6e 73 69 73 74 73 20  |k name consists |
00000530  6f 66 20 6d 6f 72 65 20  74 68 61 6e 20 6f 6e 65  |of more than one|
00000540  20 77 6f 72 64 2c 20 69  74 20 73 68 6f 75 6c 64  | word, it should|
00000550  20 62 65 20 65 6e 63 6c  6f 73 65 64 0a 20 20 20  | be enclosed.   |
00000560  20 20 20 20 20 69 6e 20  71 75 6f 74 65 73 3b 20  |     in quotes; |
00000570  66 6f 72 20 65 78 61 6d  70 6c 65 2c 0a 0a 20 20  |for example,..  |
00000580  20 20 20 20 20 20 20 20  2a 54 61 73 6b 45 6e 73  |        *TaskEns|
00000590  75 72 65 20 22 41 44 46  53 20 46 69 6c 65 72 22  |ure "ADFS Filer"|
000005a0  20 2e 2e 2e 0a 0a 20 20  20 20 20 20 20 20 54 68  | .....        Th|
000005b0  65 20 63 6f 6d 6d 61 6e  64 20 64 6f 65 73 20 6e  |e command does n|
000005c0  6f 74 20 6e 65 65 64 20  74 6f 20 62 65 20 69 6e  |ot need to be in|
000005d0  20 71 75 6f 74 65 73 2c  20 65 76 65 6e 20 69 66  | quotes, even if|
000005e0  20 69 74 20 69 73 20 6d  6f 72 65 20 74 68 61 6e  | it is more than|
000005f0  20 6f 6e 65 0a 20 20 20  20 20 20 20 20 77 6f 72  | one.        wor|
00000600  64 20 2d 20 65 76 65 72  79 74 68 69 6e 67 20 61  |d - everything a|
00000610  66 74 65 72 20 74 68 65  20 74 61 73 6b 20 6e 61  |fter the task na|
00000620  6d 65 20 69 73 20 6a 75  73 74 20 70 61 73 73 65  |me is just passe|
00000630  64 20 73 74 72 61 69 67  68 74 20 74 6f 0a 20 20  |d straight to.  |
00000640  20 20 20 20 20 20 4f 53  5f 43 4c 49 2e 0a 0a 20  |      OS_CLI... |
00000650  20 20 20 20 20 20 20 53  65 65 20 74 68 65 20 4f  |       See the O|
00000660  62 65 79 20 66 69 6c 65  20 27 45 78 61 6d 70 6c  |bey file 'Exampl|
00000670  65 73 27 20 66 6f 72 20  73 6f 6d 65 20 65 78 61  |es' for some exa|
00000680  6d 70 6c 65 73 20 6f 66  20 68 6f 77 20 74 6f 20  |mples of how to |
00000690  75 73 65 0a 20 20 20 20  20 20 20 20 54 61 73 6b  |use.        Task|
000006a0  45 6e 73 75 72 65 2e 0a  0a 0a 4c 69 63 65 6e 63  |Ensure....Licenc|
000006b0  65 0a 2d 2d 2d 2d 2d 2d  2d 0a 20 20 20 20 20 20  |e.-------.      |
000006c0  20 20 54 61 73 6b 45 6e  73 75 72 65 20 69 73 20  |  TaskEnsure is |
000006d0  66 72 65 65 77 61 72 65  2e 20 20 42 79 20 74 68  |freeware.  By th|
000006e0  69 73 20 49 20 6d 65 61  6e 20 74 68 61 74 20 69  |is I mean that i|
000006f0  74 20 6d 61 79 20 62 65  20 66 72 65 65 6c 79 0a  |t may be freely.|
00000700  20 20 20 20 20 20 20 20  64 69 73 74 72 69 62 75  |        distribu|
00000710  74 65 64 20 61 73 20 6c  6f 6e 67 20 61 73 20 74  |ted as long as t|
00000720  68 69 73 20 21 52 65 61  64 6d 65 20 66 69 6c 65  |his !Readme file|
00000730  20 61 6e 64 20 74 68 65  20 6f 62 65 79 20 66 69  | and the obey fi|
00000740  6c 65 20 27 45 78 61 6d  70 6c 65 73 27 0a 20 20  |le 'Examples'.  |
00000750  20 20 20 20 20 20 61 63  63 6f 6d 70 61 6e 79 20  |      accompany |
00000760  69 74 2c 20 61 6e 64 20  6e 6f 74 68 69 6e 67 20  |it, and nothing |
00000770  69 73 20 6d 6f 64 69 66  69 65 64 2e 0a 0a 20 20  |is modified...  |
00000780  20 20 20 20 20 20 49 66  20 79 6f 75 20 68 61 76  |      If you hav|
00000790  65 20 74 68 65 20 73 6f  75 72 63 65 20 63 6f 64  |e the source cod|
000007a0  65 20 74 6f 20 54 61 73  6b 45 6e 73 75 72 65 2c  |e to TaskEnsure,|
000007b0  20 70 6c 65 61 73 65 20  64 6f 20 6e 6f 74 20 64  | please do not d|
000007c0  69 73 74 72 69 62 75 74  65 20 69 74 0a 20 20 20  |istribute it.   |
000007d0  20 20 20 20 20 73 65 70  61 72 61 74 65 6c 79 20  |     separately |
000007e0  66 72 6f 6d 20 74 68 65  20 6f 74 68 65 72 20 66  |from the other f|
000007f0  69 6c 65 73 2c 20 61 6e  64 20 64 6f 20 6e 6f 74  |iles, and do not|
00000800  20 64 69 73 74 72 69 62  75 74 65 20 6d 6f 64 69  | distribute modi|
00000810  66 69 65 64 0a 20 20 20  20 20 20 20 20 76 65 72  |fied.        ver|
00000820  73 69 6f 6e 73 2e 20 20  49 66 20 79 6f 75 20 77  |sions.  If you w|
00000830  61 6e 74 20 74 6f 20 75  73 65 20 62 69 74 73 20  |ant to use bits |
00000840  6f 66 20 74 68 65 20 73  6f 75 72 63 65 20 69 6e  |of the source in|
00000850  20 79 6f 75 72 20 6f 77  6e 20 70 72 6f 67 72 61  | your own progra|
00000860  6d 2c 0a 20 20 20 20 20  20 20 20 70 6c 65 61 73  |m,.        pleas|
00000870  65 20 72 65 6d 65 6d 62  65 72 20 74 6f 20 61 63  |e remember to ac|
00000880  6b 6e 6f 77 6c 65 64 67  65 20 6d 79 20 63 6f 6e  |knowledge my con|
00000890  74 72 69 62 75 74 69 6f  6e 21 20 3a 29 0a 0a 20  |tribution! :).. |
000008a0  20 20 20 20 20 20 20 54  61 73 6b 45 6e 73 75 72  |       TaskEnsur|
000008b0  65 20 69 73 20 73 75 70  70 6c 69 65 64 20 22 61  |e is supplied "a|
000008c0  73 20 69 73 22 2c 20 61  6e 64 20 77 69 74 68 6f  |s is", and witho|
000008d0  75 74 20 67 75 61 72 61  6e 74 65 65 2e 20 20 50  |ut guarantee.  P|
000008e0  6c 65 61 73 65 20 6e 6f  74 65 0a 20 20 20 20 20  |lease note.     |
000008f0  20 20 20 74 68 61 74 20  74 68 65 20 61 75 74 68  |   that the auth|
00000900  6f 72 20 61 63 63 65 70  74 73 20 6e 6f 20 72 65  |or accepts no re|
00000910  73 70 6f 6e 73 69 62 69  6c 69 74 79 20 66 6f 72  |sponsibility for|
00000920  20 61 6e 79 74 68 69 6e  67 20 6e 61 73 74 79 20  | anything nasty |
00000930  74 68 61 74 0a 20 20 20  20 20 20 20 20 68 61 70  |that.        hap|
00000940  70 65 6e 73 20 61 73 20  61 20 72 65 73 75 6c 74  |pens as a result|
00000950  20 6f 66 20 74 68 65 20  65 78 69 73 74 65 6e 63  | of the existenc|
00000960  65 20 6f 66 20 54 61 73  6b 45 6e 73 75 72 65 20  |e of TaskEnsure |
00000970  6f 72 20 69 74 73 20 61  73 73 6f 63 69 61 74 65  |or its associate|
00000980  64 0a 20 20 20 20 20 20  20 20 66 69 6c 65 73 20  |d.        files |
00000990  2d 20 79 6f 75 20 75 73  65 20 74 68 65 6d 20 65  |- you use them e|
000009a0  6e 74 69 72 65 6c 79 20  61 74 20 79 6f 75 72 20  |ntirely at your |
000009b0  6f 77 6e 20 72 69 73 6b  2e 0a 0a 20 20 20 20 20  |own risk...     |
000009c0  20 20 20 41 6e 79 6f 6e  65 20 77 61 6e 74 69 6e  |   Anyone wantin|
000009d0  67 20 74 6f 20 64 69 73  74 72 69 62 75 74 65 20  |g to distribute |
000009e0  54 61 73 6b 45 6e 73 75  72 65 20 6f 6e 20 61 20  |TaskEnsure on a |
000009f0  6c 61 72 67 65 20 73 63  61 6c 65 20 73 68 6f 75  |large scale shou|
00000a00  6c 64 20 63 6f 6e 74 61  63 74 0a 20 20 20 20 20  |ld contact.     |
00000a10  20 20 20 6d 65 20 66 69  72 73 74 2c 20 74 6f 20  |   me first, to |
00000a20  6d 61 6b 65 20 73 75 72  65 20 74 68 65 79 20 68  |make sure they h|
00000a30  61 76 65 20 74 68 65 20  6c 61 74 65 73 74 20 76  |ave the latest v|
00000a40  65 72 73 69 6f 6e 2e 0a  0a 0a 42 75 67 73 0a 2d  |ersion....Bugs.-|
00000a50  2d 2d 2d 0a 20 20 20 20  20 20 20 20 53 68 6f 75  |---.        Shou|
00000a60  6c 64 20 79 6f 75 20 66  69 6e 64 20 61 6e 79 2c  |ld you find any,|
00000a70  20 69 74 20 77 6f 75 6c  64 20 62 65 20 68 65 6c  | it would be hel|
00000a80  70 66 75 6c 20 69 66 20  79 6f 75 20 63 6f 75 6c  |pful if you coul|
00000a90  64 20 6c 65 74 20 6d 65  20 6b 6e 6f 77 20 77 68  |d let me know wh|
00000aa0  61 74 0a 20 20 20 20 20  20 20 20 74 68 65 79 20  |at.        they |
00000ab0  61 72 65 2e 20 20 55 6e  74 69 6c 20 6d 69 64 20  |are.  Until mid |
00000ac0  4a 75 6e 65 20 74 68 69  73 20 79 65 61 72 20 28  |June this year (|
00000ad0  31 39 39 36 29 20 49 20  63 61 6e 20 62 65 20 63  |1996) I can be c|
00000ae0  6f 6e 74 61 63 74 65 64  20 61 74 0a 20 20 20 20  |ontacted at.    |
00000af0  20 20 20 20 61 6a 77 6b  31 30 30 40 68 65 72 6d  |    ajwk100@herm|
00000b00  65 73 2e 63 61 6d 2e 61  63 2e 75 6b 2e 20 20 4f  |es.cam.ac.uk.  O|
00000b10  74 68 65 72 77 69 73 65  20 6d 79 20 70 6f 73 74  |therwise my post|
00000b20  61 6c 20 61 64 64 72 65  73 73 20 69 73 3a 0a 0a  |al address is:..|
00000b30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000b40  32 33 20 43 6f 6e 69 66  65 72 20 43 6c 6f 73 65  |23 Conifer Close|
00000b50  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000b60  20 43 68 75 72 63 68 20  43 72 6f 6f 6b 68 61 6d  | Church Crookham|
00000b70  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000b80  20 46 6c 65 65 74 0a 20  20 20 20 20 20 20 20 20  | Fleet.         |
00000b90  20 20 20 20 20 20 20 48  61 6e 74 73 0a 20 20 20  |       Hants.   |
00000ba0  20 20 20 20 20 20 20 20  20 20 20 20 20 47 55 31  |             GU1|
00000bb0  33 20 30 4c 52 0a 0a 20  20 20 20 20 20 20 20 43  |3 0LR..        C|
00000bc0  6f 6d 6d 65 6e 74 73 20  61 6e 64 20 73 75 67 67  |omments and sugg|
00000bd0  65 73 74 69 6f 6e 73 20  61 72 65 20 61 6c 73 6f  |estions are also|
00000be0  20 77 65 6c 63 6f 6d 65  2e 0a                    | welcome..|
00000bea