SetPri V1.7 9 July 1994 Copyright Richard Waspe 1994 Freely Distributable other than by Magazine Coverdisk SetPri is used to change the priority of any running task or process, and needs WB2 or above. It differs from C:ChangeTaskPri, in that it does not need to know the Process Number of the program to change. It DOES need to be given the full name of the task to change. SetPri does not allow you to change the priority outside the range -50 to +19. This was written as a simple shell command that does not need a GUI and can be used in scripts or from the shell. The task or process to change can have been launched by any means from a shell, the Workbench, Toolmanager, etc. It was written for a friend who needed to lower the priority of a 3D rendering process to be able to use the serial port without errors. USAGE : Although SetPri will run from the Workbench, it will only really make sense to run it from the shell or a script. It takes the ReadArgs template : NAME/A,PRIORITY/A/N,Q=QUIET/S NAME is the name of the running Task or Process to change. This parameter is compulsory and must be an ascii string. PRIORITY is the new priority you wish to give the Task or Process. It must be a number between -50 and +19. This limit is sensible for normal use and will not allow you to block input.device. This parameter is compulsory. Q=QUIET . Specifying Q or QUIET as the last parameter will stop SetPri from issuing any messages. Useful for scripts. This parameter is optional. EXAMPLES : SetPri ARTM 3 Q Sets the priority of the Task ARTM (if running) to 3. No messages are output. SetPri input.device 18 Lowers the priority of the input.device from 20 to 18 and reports what it has done to the shell. SetPri NAME Fred PRIORITY 12 QUIET Changes the priority of task Fred to 12 with no message reporting. The Keywords are NOT compulsory. RETURN CODES : 0 : All was OK, and the Task priority was changed 5 : There was an error in the ReadArgs parameters 10 : The requested priority was out of the range -50 to +19 20 : The named task could not be found. Either it was not running or you spelt it wrong. COPYRIGHT : I retain full copyright over this program. It may be freely distributed electronically or by reasonable cost PD floppy disks. Magazines are specifically forbidden from publishing SetPri on any coverdisk without my express written permission. Any magazine failing to abide by this condition will be held in breach of copyright. DISCLAIMER : Use this program at your own risk. I make no claims of it's fitness for purpose and will not be held responsible for any loss, damage or injury, consequential or otherwise, resulting from it's use or distribution. CREDITS : Many thanks to Eddy Carroll for the Task list searching code which enabled CLI launched tasks to be found and is the heart of the program. Richard Waspe waspy@cix.compulink.co.uk (preferred) rwaspe@hamlet.adsp.sub.org (when working...)