home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 2
/
FFMCD02.bin
/
new
/
amigalibdisks
/
disk946
/
priman
/
priman.doc
< prev
next >
Wrap
Text File
|
1993-12-21
|
13KB
|
285 lines
PriMan
A task priority manager
Requires Amiga Release 2 (or greater)
Copyright 1993 Barry McConnell
Distribution:
~~~~~~~~~~~~~
This program is Freeware. You may freely distribute it, and charge only a
small fee to cover expenses. It must remain unmodified, and accompanied by
this doc file (and optionally the source code).
Fred Fish is explicitly given permission to place this program on his fine
disk collection. Walnut Creek are also allowed to use it on their Aminet
CD-ROM.
If you like PriMan, or have any bug reports or suggestions, please send me a
message via e-mail (or a postcard, if you don't have access to Internet or
FidoNet).
As with any free software, you use PriMan entirely at your own risk. If you
manage to start off World War 3 by discovering a bug, then I can not be held
responsible...
Overview:
~~~~~~~~~
PriMan is a fully Style Guide-compliant program for viewing a list of all
running tasks, and performing some actions on them. The window in which the
list appears can be resized, the fonts used can be chosen from a settings
window, and customised settings can be stored in the ToolTypes. PriMan takes
advantage of a few extra features available under Release 3, although you
probably won't notice these unless you examine the source code carefully. :-)
PriMan allows the user to change the priority of any task with the greatest
of ease. Unlike most other utilities, you need only drag a slider to change
the priority -- there is no messy clicking in string gadgets, deleting the
old priority, and typing in a new one. Also, there are buttons to signal a
task with Ctrl-C, and remove it from memory. Optionally, an "Are you
sure?"-style requester can prevent you from doing this accidentally. And if
you like to have it handy all the time, there is an Iconify option, as well
as the ability to leave it running in the background all the time as a
Commodity.
Using PriMan:
~~~~~~~~~~~~~
Main Window:
- ListView gadget. This is where all the tasks are displayed, with their
priority in the second column.
- Slider gadget. Drag this and let go to change the currently-selected
task's priority. Alternatively, click to the left or right of the bar to
change the priority in steps of one.
- Break button. This will signal the task with "Ctrl-C". Many programs
abort if they receive this signal. It is a nice way of letting something
know you want it to finish, as it gives it a chance to clean up after itself.
PriMan will wait for half a second after sending the signal, to give the task
a chance to exit, before updating the ListView.
- Kill button. This is nastier than the Break gadget, as it doesn't give the
task a say in the matter. It just removes it from memory, meaning any memory
regions may not be freed up, resources will not be available to other tasks,
etc. This button should really only be used as a last resort for tasks that
have gone out of control.
Note that removing a task that has exited since PriMan's display was last
updated is NOT a good idea! PriMan does some simple checking to ensure you
don't do this, but it is not 100% foolproof. (98.8%, actually. :-) If your
Amiga crashes because you told PriMan to remove a non-existent task, you have
nobody to blame but yourself...
If the task has any windows open, PriMan will ask you if you want to close
them as well. Likewise, it is not a good idea to answer "yes" to this
question if, since putting up the requester, the windows have already been
closed. Your Amiga will certainly crash if you do this.
- Settings button. This will open up the settings window, described below.
- Size gadget (lower right border of window). You can make the window small
enough to accommodate only two tasks in the ListView, or large enough to fill
the screen. All the gadgets in the window will be redrawn to fit in with the
new window size.
There are also a few keys you can press:
The Help key brings up some information about me, and the version number.
The Space and Return keys both update the ListView. Note that this operation
is very expensive, as it must disable task switching and interrupts, before
walking through both of Exec's task lists, making a copy of each entry, and
sorting them into alphabetical order. Thus you may get a serial error if you
are doing a modem transfer, or the pointer may "flash" if you are using
LacePointer on a slow Amiga.
The Tab key alternates between "narrow" and "wide" scales for the slider
gadget, if it is not disabled. Normally, the slider displays task priorities
between -25 and +25, as it is unusual to find a task with an extremely low or
extremely high priority. By pressing Tab, a "wide" scale can be used,
allowing you to move the slider outside the -25 to +25 range. This operation
is done automatically if you select a task that happens to have a priority
outside this range.
The Escape key is similar to clicking the close gadget. However, if you
have enabled the Iconify option (see below) or are running PriMan as a
Commodity, this will force it to quit, instead of closing down its windows
and running in the background.
Settings Window:
- "Gadget Font..." This will bring up the standard ASL Font requester, where
you can select the font used for all the buttons.
- "List Font..." A different (non-proportional) font needs to be used for
the ListView, as otherwise the second column would not line up properly.
This is where you select it.
- "Confirm actions" If you are afraid of accidentally signalling or
removing a task, select this checkbox. PriMan will then ask you for
confirmation before performing either of these actions.
- "Iconify when closed" If this is selected, whenever you click the close
gadget on the main window, an AppIcon will be placed on the Workbench.
Double-clicking on this will open the main PriMan window again.
- "Install as a Commodity" Should you not want PriMan to be a Commodity,
you can deselect this checkbox. Note that when you click the "Save" or "Use"
buttons (see below), PriMan will install or remove itself as a Commodity,
depending on this setting. If it tries to install itself, and finds another
copy of PriMan already installed, it will quietly exit, and the first copy
will bring itself to the front.
- "Popup when launched" If you are putting PriMan into your WBStartup
drawer, you may like to have this option deselected, so it will be silently
started each time you boot your Amiga. Note that this option is ignored if
you don't have one (or both) of "Iconify when closed" and "Install as a
Commodity" selected, as otherwise there would be no way of letting PriMan
know when you want it to open its window!
- "Hotkey" If you have PriMan running as a Commodity, this is the keypress
you use to open its window. Check out your Workbench manual to find out
the acceptable combinations of keypresses.
- "Priority" This is the Commodity priority PriMan runs at. It is best
left at zero, and only really comes into play when two commodities try to
allocate the same hotkey for themselves. Note that this setting is only read
once: when you first launch PriMan. Any change you make to it will not get
recognised until you quit PriMan and launch it again. (This is not really a
problem, since in practice you will always leave it at zero.)
- Save button. This will write out your font choices, confirmation setting,
and window size and position to PriMan's ToolTypes, held in the PriMan.info
file (choose "Get Info" from Workbench if you need to change these manually).
Any ToolTypes already present that PriMan does not recognise will be
preserved. Valid ToolTypes include:
LEFT = left edge of window
TOP = top edge of window
WIDTH = window width
HEIGHT = window height
GADFONT = name of font used for gadgets
GADSIZE = height of GADFONT
LISTFONT = name of (non-proportional) font used in the ListView
LISTSIZE = height of LISTFONT
ICONLEFT = left position of AppIcon
ICONTOP = top position of AppIcon
CONFIRM = YES|NO - the "Confirm actions" setting