home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a081 / 2.ddi / CTFXX.EXE / FOXFAX00.PRG < prev    next >
Encoding:
Text File  |  1993-05-12  |  2.8 KB  |  85 lines

  1. *.............................................................................
  2. *   Program Name: FOXFAX00.PRG     Copyright: Magna Carta Software, Inc.
  3. *   Date Created: 10-19-91         Language: FoxPro v2.0+ (DOS, Windows)
  4. *.............................................................................
  5. * Description: Send a file as a FAX from the DOS command line.
  6. * The recipient's phone number, name and the file name must be given.
  7. * Invoke from the command window with this syntax:
  8. * DO foxfax00 WITH "foxapi.txt", "xxx-xxxx", "Freddy Fox"
  9. * where xxx-xxxx is the phone number to call
  10. * NOTE: This file requires a CAS-compliant device in the sending computer.
  11. *.............................................................................
  12. PARAMETERS filename, phone, recipient
  13.  
  14. parms = PARAMETERS()
  15.  
  16. SET TALK OFF
  17. SET ESCAPE OFF
  18.  
  19. * Load the right library
  20. foxid = VERS()
  21. IF "2.0" $ foxid
  22.     SET LIBR TO ftf                 && Identified FoxPro 2.0
  23. ELSE
  24.     IF "2.5" $ VERS()
  25.         IF "Windows" $ foxid        && Identified FoxPro 2.5 for Windows
  26.             SET LIBR TO ftfw
  27.         ELSE
  28.             SET LIBR TO ftf25       && Identified FoxPro 2.5 for DOS
  29.         ENDIF
  30.     ENDIF
  31. ENDIF
  32.  
  33.  
  34. DO ftfhdr
  35. version = 0
  36.  
  37. PUBLIC logon0, logon1, logon2, logon3, logon4, logon5, logon6, logon7
  38. PUBLIC ret
  39.  
  40. logon0 = "FOXFAX -- The DOS command line FAX software for CAS FAX devices such"
  41. logon1 = "as the Intel Connection CoProcessor and SatisFAXion card."
  42. logon2 = "This program was created with the CommTools - Fox communications library"
  43. logon3 = "Published by..."
  44. logon4 = "Pinnacle Publishing, Inc."
  45. logon5 = "P.O. Box 8099"
  46. logon6 = "Federal Way, WA 98003"
  47. logon7 = "Voice: (206) 251-1900,  FAX: (206) 251-5057,  BBS: (206) 251-6217."
  48.  
  49. CLEAR                                   && clear screen
  50. @ 00, 00 SAY logon0                     && print opening screen
  51. @ 01, 00 SAY logon1
  52. @ 02, 00 SAY logon2
  53. @ 03, 00 SAY logon3
  54. @ 04, 00 SAY logon4
  55. @ 05, 00 SAY logon5
  56. @ 06, 00 SAY logon6
  57. @ 07, 00 SAY logon7
  58.  
  59. IF parms < 2
  60.     @ 09,00 SAY 'Syntax: FOXFAX00 "filename", "phone number", "recipient"'
  61.     IF cas_exist() == 0
  62.         @ 10,00 SAY "CAS-compliant FAX device not installed."
  63.     ELSE
  64.         @ 10,00 SAY "CAS-compliant FAX device found."
  65.     ENDIF
  66. ELSE
  67.     IF cas_exist() == 0
  68.         @ 10,00 SAY "CAS-compliant FAX device not installed."
  69.     ELSE
  70.         @ 10,00 SAY "CAS-compliant FAX device found."
  71.         ret = cas_send_one_file(filename, recipient, phone)
  72.         IF ret < 0
  73.             @ 11,00 SAY "Error in transmission.  CAS Error: " + UPPER(D2X(ABS(ret))) + "h"
  74.         ELSE
  75.             @ 11,00 SAY "FAX successfully submitted (task ID " + ALLTRIM(STR(ret)) + ")"
  76.         ENDIF
  77.     ENDIF
  78. ENDIF
  79.  
  80. SET LIBRARY TO
  81. CLOSE ALL
  82. CLEAR ALL
  83.  
  84. RETURN (0)
  85.