home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / fax067.zip / killfw.doc < prev    next >
Text File  |  1996-10-03  |  3KB  |  86 lines

  1. Short Docu to KillFW ....
  2.  
  3. KillFW was written to use FaxWorks and a mailer in conjunction!
  4.  
  5. KillFW works as a deamon to watch FaxWorks activity (Send & Spool) and if
  6. no such activity is encountered, KillFW sends a WM_QUIT message to
  7. FaxWorks to force it to end. If WM_QUIT does not STOP FaxWorks (eg if a
  8. dialog rises in FaxWorks) KillFW will kill the FaxWorks session and so
  9. mailer will restart.
  10.  
  11. What must be done ?
  12.  
  13. 1)  A fax must be 'printed' to FaxWorks printer port (either local or via
  14.     network) INCLUDING all neccessary informations for FaxWorks to start
  15.     sending immediatly:
  16.  
  17.     a)  the fax (you want to print) must be in plain ASCII and FIRST line
  18.         must contain (at least):
  19.         >>TO=receivers_name,receivers_company,receivers_fax_number
  20.  
  21.     b)  if fax is NOT plain ASCII (eg printed via a PM or WIN app), you must
  22.         use an alternate methode, please look in the manual for FaxWorks!
  23.         I do not quite know HOW, but I know THAT it is possible via a
  24.         certain FILE, which is read from faxworks when reaching a print.
  25.  
  26.     It is recommended to 'print' to an intermediat 'printfile'!
  27.  
  28. 2)  Mailers CMD (eg BINKLEY.CMD or CL.CMD) must contain 'a way out', eg
  29.  
  30.     ...
  31.     :Top
  32.     ...
  33.     mailer.exe
  34.     ...
  35.     if ErrorLevel 15 goto AutoFax
  36.     ...
  37.     :AutoFax
  38.     rem ErrorLevel 15
  39.     start "FaxWorks AutoKiller" /C /B /WIN /MIN /I KillFW e:\faxworks\fax.log
  40.     FaxWorks
  41.     goto Top
  42.     ...
  43.  
  44.     The statement '/MIN' may be omitted to watch activities.
  45.  
  46. 3)  Start real printing (of intermediate printfile) and signal mailer to
  47.     exit at choosen errorlevel (eg from a *.BAT or *.CMD), assuming
  48.     FaxWorks printer port is LPT4:
  49.  
  50.     print /D:LPT4 PRNFILE.EXT
  51.     Rem Mailer is Binkley in Task 1
  52.     echo . > X:\PATH\FLAGS\BTEXIT0F.01
  53.     Rem Mailer is Cantaloup in Task 1
  54.     echo . > X:\PATH\FLAGS\CLEXIT0F.01
  55.  
  56.  
  57. 4)  Mailer will encounter the semaphor file and exit with errorlevel set, so
  58.     label :AutoFax is executed. FaxWorks sets status of fax (in FAX.LOG) only
  59.     to 'Send' or 'Spool' if either activ sending or (eg after a lineerror)
  60.     a retransmit is in progress.
  61.  
  62. 5)  If KillFW does not encounter ANY 'Send' or 'Spool' in FAX.LOG (for two
  63.     contigues times) if will first send a WM_QUIT message to FaxWorks. If
  64.     FaxWorks finishes in accordance to WM_QUIT, KillFW will stop activity
  65.     and close itself. If FaxWorks does not react to WM_QUIT (eg some other
  66.     activities are in progress and a dialog window is shown to user) KillFW
  67.     will KILL FaxWorks (by DosKillProcess()) and also close itself.
  68.  
  69.  
  70. For clearness, KILLFW.C is also supplied and KILLPROC.C (a near relativ to
  71. KILLFW).
  72.  
  73. KILLPROC.EXE can be used to KILL any process, either by supplying a
  74. ProcessID or the name of the EXE (FILENAME.EXE) and (optionally) a
  75. 'searchcount'. PSTAT is used to get ProcessID internally. If a program is
  76. started twice (or more) like PMSHELL.EXE, the 'searchcount' is used (normally
  77. ONE) to find out right ProcessID. If you want to KILL PMSHELL.EXE, alsways
  78. use 2 as count (second copy is in fact the WPS with all its glamour)!.
  79.  
  80. Harald Pollack
  81.  
  82. E-Mail:
  83.  
  84. Fido 2:310/14.59
  85. Internet Harald.Pollack@OMV.CO.AT
  86.