home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
fax067.zip
/
killfw.doc
< prev
next >
Wrap
Text File
|
1996-10-03
|
3KB
|
86 lines
Short Docu to KillFW ....
KillFW was written to use FaxWorks and a mailer in conjunction!
KillFW works as a deamon to watch FaxWorks activity (Send & Spool) and if
no such activity is encountered, KillFW sends a WM_QUIT message to
FaxWorks to force it to end. If WM_QUIT does not STOP FaxWorks (eg if a
dialog rises in FaxWorks) KillFW will kill the FaxWorks session and so
mailer will restart.
What must be done ?
1) A fax must be 'printed' to FaxWorks printer port (either local or via
network) INCLUDING all neccessary informations for FaxWorks to start
sending immediatly:
a) the fax (you want to print) must be in plain ASCII and FIRST line
must contain (at least):
>>TO=receivers_name,receivers_company,receivers_fax_number
b) if fax is NOT plain ASCII (eg printed via a PM or WIN app), you must
use an alternate methode, please look in the manual for FaxWorks!
I do not quite know HOW, but I know THAT it is possible via a
certain FILE, which is read from faxworks when reaching a print.
It is recommended to 'print' to an intermediat 'printfile'!
2) Mailers CMD (eg BINKLEY.CMD or CL.CMD) must contain 'a way out', eg
...
:Top
...
mailer.exe
...
if ErrorLevel 15 goto AutoFax
...
:AutoFax
rem ErrorLevel 15
start "FaxWorks AutoKiller" /C /B /WIN /MIN /I KillFW e:\faxworks\fax.log
FaxWorks
goto Top
...
The statement '/MIN' may be omitted to watch activities.
3) Start real printing (of intermediate printfile) and signal mailer to
exit at choosen errorlevel (eg from a *.BAT or *.CMD), assuming
FaxWorks printer port is LPT4:
print /D:LPT4 PRNFILE.EXT
Rem Mailer is Binkley in Task 1
echo . > X:\PATH\FLAGS\BTEXIT0F.01
Rem Mailer is Cantaloup in Task 1
echo . > X:\PATH\FLAGS\CLEXIT0F.01
4) Mailer will encounter the semaphor file and exit with errorlevel set, so
label :AutoFax is executed. FaxWorks sets status of fax (in FAX.LOG) only
to 'Send' or 'Spool' if either activ sending or (eg after a lineerror)
a retransmit is in progress.
5) If KillFW does not encounter ANY 'Send' or 'Spool' in FAX.LOG (for two
contigues times) if will first send a WM_QUIT message to FaxWorks. If
FaxWorks finishes in accordance to WM_QUIT, KillFW will stop activity
and close itself. If FaxWorks does not react to WM_QUIT (eg some other
activities are in progress and a dialog window is shown to user) KillFW
will KILL FaxWorks (by DosKillProcess()) and also close itself.
For clearness, KILLFW.C is also supplied and KILLPROC.C (a near relativ to
KILLFW).
KILLPROC.EXE can be used to KILL any process, either by supplying a
ProcessID or the name of the EXE (FILENAME.EXE) and (optionally) a
'searchcount'. PSTAT is used to get ProcessID internally. If a program is
started twice (or more) like PMSHELL.EXE, the 'searchcount' is used (normally
ONE) to find out right ProcessID. If you want to KILL PMSHELL.EXE, alsways
use 2 as count (second copy is in fact the WPS with all its glamour)!.
Harald Pollack
E-Mail:
Fido 2:310/14.59
Internet Harald.Pollack@OMV.CO.AT