home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / page.cmd < prev    next >
OS/2 REXX Batch file  |  1995-07-13  |  1KB  |  36 lines

  1. /************************************************************/
  2. /*  PAGE.CMD                                                */
  3. /*  DIALS PAGER WITH NUMERIC MESSAGE                        */
  4. /*  ALAN STEIN   7/5/95    astein@mobile.bam.com            */
  5. /************************************************************/
  6. /*  args:                                                   */
  7. /*        name = name of person to be called (ie. Alan)     */
  8. /*      number = number of pager (ie. 7775441)              */
  9. /*     message = numeric message to be sent (ie. 9760000)*/
  10. /************************************************************/
  11.  
  12. arg name number message
  13. '@echo off'
  14. ModemPort = "COM2"
  15. call RxFuncAdd 'SysLoadFuncs' , 'RexxUtil' , 'SysLoadFuncs'
  16. call SysLoadFuncs
  17.  
  18. say 'Currently Dialing... '||name||' @ '||number
  19. say '                     Message = '||message
  20. call dialphone
  21.  
  22. exit
  23.  
  24. /************************************************************/
  25. dialphone:
  26.      State = STREAM(ModemPort,"C","OPEN")
  27.      "@MODE" ModemPort":38400,N,8,1 > NUL"
  28.      CALLINE =  "ATDT"||number||"@"||message
  29.      CALL LINEOUT ModemPort, CALLINE          /* Dial Phone */
  30.      CALL SYSSLEEP 20
  31.      CALL LINEOUT ModemPort, "ATh0"           /* Hang Up    */
  32.      State = STREAM(ModemPort,"C","CLOSE")
  33. return
  34. /************************************************************/
  35.  
  36.