home *** CD-ROM | disk | FTP | other *** search
- *.............................................................................
- * Program Name: FOXFAX00.PRG Copyright: Magna Carta Software, Inc.
- * Date Created: 10-19-91 Language: FoxPro v2.0+ (DOS, Windows)
- *.............................................................................
- * Description: Send a file as a FAX from the DOS command line.
- * The recipient's phone number, name and the file name must be given.
- * Invoke from the command window with this syntax:
- * DO foxfax00 WITH "foxapi.txt", "xxx-xxxx", "Freddy Fox"
- * where xxx-xxxx is the phone number to call
- * NOTE: This file requires a CAS-compliant device in the sending computer.
- *.............................................................................
- PARAMETERS filename, phone, recipient
-
- parms = PARAMETERS()
-
- SET TALK OFF
- SET ESCAPE OFF
-
- * Load the right library
- foxid = VERS()
- IF "2.0" $ foxid
- SET LIBR TO ftf && Identified FoxPro 2.0
- ELSE
- IF "2.5" $ VERS()
- IF "Windows" $ foxid && Identified FoxPro 2.5 for Windows
- SET LIBR TO ftfw
- ELSE
- SET LIBR TO ftf25 && Identified FoxPro 2.5 for DOS
- ENDIF
- ENDIF
- ENDIF
-
-
- DO ftfhdr
- version = 0
-
- PUBLIC logon0, logon1, logon2, logon3, logon4, logon5, logon6, logon7
- PUBLIC ret
-
- logon0 = "FOXFAX -- The DOS command line FAX software for CAS FAX devices such"
- logon1 = "as the Intel Connection CoProcessor and SatisFAXion card."
- logon2 = "This program was created with the CommTools - Fox communications library"
- logon3 = "Published by..."
- logon4 = "Pinnacle Publishing, Inc."
- logon5 = "P.O. Box 8099"
- logon6 = "Federal Way, WA 98003"
- logon7 = "Voice: (206) 251-1900, FAX: (206) 251-5057, BBS: (206) 251-6217."
-
- CLEAR && clear screen
- @ 00, 00 SAY logon0 && print opening screen
- @ 01, 00 SAY logon1
- @ 02, 00 SAY logon2
- @ 03, 00 SAY logon3
- @ 04, 00 SAY logon4
- @ 05, 00 SAY logon5
- @ 06, 00 SAY logon6
- @ 07, 00 SAY logon7
-
- IF parms < 2
- @ 09,00 SAY 'Syntax: FOXFAX00 "filename", "phone number", "recipient"'
- IF cas_exist() == 0
- @ 10,00 SAY "CAS-compliant FAX device not installed."
- ELSE
- @ 10,00 SAY "CAS-compliant FAX device found."
- ENDIF
- ELSE
- IF cas_exist() == 0
- @ 10,00 SAY "CAS-compliant FAX device not installed."
- ELSE
- @ 10,00 SAY "CAS-compliant FAX device found."
- ret = cas_send_one_file(filename, recipient, phone)
- IF ret < 0
- @ 11,00 SAY "Error in transmission. CAS Error: " + UPPER(D2X(ABS(ret))) + "h"
- ELSE
- @ 11,00 SAY "FAX successfully submitted (task ID " + ALLTRIM(STR(ret)) + ")"
- ENDIF
- ENDIF
- ENDIF
-
- SET LIBRARY TO
- CLOSE ALL
- CLEAR ALL
-
- RETURN (0)
-