home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / zow311.exe / INSTALL.FIL / SCRIPT / FAXCALL.ZRX < prev    next >
Text File  |  1996-08-26  |  2KB  |  66 lines

  1. /* REXX */
  2.  
  3. SAY "This file is not executable as it is."
  4. SAY "It contains two functions that you could use in your own REXX"
  5. SAY "programs."
  6. SAY "One function initializes a Class-2 fax modem to receive data"
  7. SAY "and fax CALLs."
  8. SAY "The second function passes an incoming fax CALL to OS/2-FaxWorks"
  9. SAY "via FaxWork's hot handle feature."
  10.  
  11. EXIT
  12.  
  13.  
  14. /* -------------------------------------------------------------- */
  15. /* init a FAX class 2 modem for adaptive CALLing                  */
  16. /* (works with FAX class 2 modems)                                */
  17. /* -------------------------------------------------------------- */
  18. faxmode:
  19.     CrLf = "^M^J"
  20.     CALL ZocSend "AT+fclass=2"||CrLf
  21.  
  22.     CALL ZocSend "AT+FCR=1"||CrLf
  23.     CALL ZocWait "OK"
  24.  
  25.     CALL ZocSend "AT+FDCC=1,5,0,2,0,0,0,0"||CrLf
  26.     CALL ZocWait "OK"
  27.  
  28.     CALL ZocSend "AT+FCQ=0"||CrLf
  29.     CALL ZocWait "OK"
  30.  
  31.     CALL ZocSend "AT+FAA=1"||CrLf
  32.     CALL ZocWait "OK"
  33.  
  34.     CALL ZocWrite CrLf||"FAX-MODE SET ..."||Crlf
  35.     RETURN
  36.  
  37.  
  38.  
  39. /* -------------------------------------------------------------- */
  40. /* receive a FAX CALL                                             */
  41. /* (will work with OS/2 FaxWorks only)                            */
  42. /* -------------------------------------------------------------- */
  43. faxCALL:
  44.     result= ZocWait("+FCON")
  45.     IF result = 0 THEN
  46.     DO
  47.         /* ********************************************* */
  48.         /* SLOW DOWN PORT SPEED TO MEET FAXWORKS DEFAULT */
  49.         /* ********************************************* */
  50.         CALL ZocBaud "14400"
  51.  
  52.         /* ************************************** */
  53.         /* START FAXWORKS WITH HOT HANDLE FEATURE */
  54.         /* ************************************** */
  55.         CALL ZocXferShell "\faxworks\FAXWORKS.EXE -n7,%ZOCHFC%"
  56.  
  57.         /* ***************************** */
  58.         /* RESET PORT SPEED TO OUR NEEDS */
  59.         /* ***************************** */
  60.         CALL ZocBaud "38400"
  61.     END
  62.     RETURN
  63.  
  64. /* END OF REXX-MODULE */
  65.  
  66.