home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / comm / ssfaxr11.zip / CLIPPER.ZIP / CLIPFAX.PRG next >
Text File  |  1993-04-30  |  923b  |  48 lines

  1. /*
  2.  
  3.   FUNCTION: ClipFax()
  4.   Description: Function to use FAXER.EXE from Simple Simon Software
  5.                from within CLIPPER 5.2
  6.   Calls: BLINKER 2.01 SwpRunCmd()
  7.  
  8. */
  9.  
  10. FUNCTION CLIPFAX(cPort,cPhone,cFile)
  11. LOCAL cString, lSuccess, nWhatHappened
  12.  
  13. // Resolve Parameters
  14. IF Pcount() < 3
  15.    RETURN(.F.)         // Failed
  16. ENDIF
  17.  
  18.  
  19. // Use Clipper to Validate File
  20. IF !FILE(cFile)
  21.    RETURN(.F.)         // File Not Found
  22. ENDIF
  23.  
  24.  
  25. //Fix up the command String
  26. cString := ("FAXER " + cPort+ " " + cPhone + " " + cFile)
  27.  
  28.  
  29. // Leave the rest to Faxer
  30. lSuccess := SwpRunCmd(cString)     // Call to BLINKER's SwpRunCmd() function
  31.  
  32.  
  33. // See if the Command Interpreter failed
  34. IF (!lSuccess)
  35.    RETURN(.F.)
  36. ENDIF
  37.  
  38.  
  39. // Otherwise,
  40. // FAXER has executed properly, so lets check the DOS errorlevel
  41. // for results
  42. nWhatHappened := ERRORLEVEL()
  43.  
  44.  
  45. // Return the DOS Errorlevel
  46. Return(nWhatHappened)
  47.  
  48.