home *** CD-ROM | disk | FTP | other *** search
/ IBM CD Showcase / OS2_CD_ROM.iso / smce0001 / faxpm / demo / api0 / SENDFAX.CMD < prev   
Encoding:
Text File  |  1993-11-10  |  2.3 KB  |  68 lines

  1. /*****************************************************************************
  2.  *
  3.  * File         SENDFAX.CMD
  4.  *
  5.  * Program      This REXX procedure allows to fax ASCII files.
  6.  *              The syntax of the procedure is :
  7.  *              SENDFAX <ascii_file> <output_file> <fax_number> <bitmap_file>
  8.  *
  9.  * Last modif   February 17, 1993
  10.  *
  11.  * Copyright    (c) Microformatic S.A. 1993
  12.  *
  13.  *****************************************************************************/
  14.  
  15. /*****************************************************************************
  16.  *
  17.  * NOTE
  18.  *
  19.  *****************************************************************************
  20.  *
  21.  * This procedure must be called from within an OS/2 Window. Calling this
  22.  * procedure from within an OS/2 Full Screen session may cause unpredictable
  23.  * results.
  24.  *
  25.  *****************************************************************************/
  26.  
  27. SAY "SENDFAX - Automatic ASCII Faxing procedure - (c) Microformatic 1993"
  28.  
  29. /*****************************************************************************
  30.  * Check the parameters
  31.  *****************************************************************************/
  32.  parse arg infile outfile faxnum bitmap
  33.  
  34. If infile="" then do
  35.   call DisplaySyntax
  36.   exit 1
  37. end
  38.  
  39. If outfile="" then do
  40.   call DisplaySyntax
  41.   exit 1
  42. end
  43.  
  44. If faxnum="" then do
  45.   call DisplaySyntax
  46.   exit 1
  47. end
  48.  
  49. If bitmap\="" then do
  50.   bitmap="BITMAP="bitmap
  51. end
  52.  
  53. /*****************************************************************************
  54.  * Register the Fax/PM functions and send the fax
  55.  *****************************************************************************/
  56. x=RxFuncAdd('FaxLoadFuncs','FaxRexx','FaxLoadFuncs')
  57. x=FaxLoadFuncs('')
  58. x=RxSendAsciiFax('','FILE='infile';OUTFILE='outfile';FONT='12';STATUS=READY;FAXNUM='faxnum';'bitmap)
  59. exit 0
  60.  
  61. DisplaySyntax: Procedure
  62. say "The correct syntax is : SENDFAX input_file output_file fax_number bitmap_file"
  63. say "where input_file is the name of the ASCII file to send."
  64. say "      output_file is the name of the fax file to generate."
  65. say "      fax_number is the fax telephone number to send the fax to."
  66. say "      bitmap_file is the name of an OS/2 bitmap. This is optional. The bitmap"
  67. say "                  will be included at the top of the first page"
  68.