home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / CALLRT14.ZIP / CRDEMO.BAT < prev    next >
Encoding:
DOS Batch File  |  1993-05-05  |  1.5 KB  |  70 lines

  1. @ECHO OFF
  2. CLS
  3. ECHO - Call Router Demo -
  4. ECHO   Please distribute this file unaltered.
  5. ECHO.
  6. ECHO This batch file demonstrates how Call Router V1.4
  7. ECHO may be used on a standard telephone...
  8. ECHO.
  9. ECHO  In this particular example, an event is executed when 10 rings
  10. ECHO  have been detected. The event can be any program that you wish by
  11. ECHO  simply inserting a call to it in this batch file. Left unmodified,
  12. ECHO  this file will simply show you where it would have executed.
  13. ECHO.
  14. ECHO Call Router is user supported software. To assist in the future
  15. ECHO development of Call Router register today. Please consult the
  16. ECHO documentation for details.
  17. ECHO.
  18. ECHO.
  19. ECHO.
  20. ECHO.
  21. ECHO.
  22. ECHO.
  23. ECHO.
  24. ECHO.
  25. ECHO.
  26. PAUSE
  27.  
  28. IF "%1" == "" goto Usage
  29.  
  30. :Start
  31. REM Start program with COM port taken from command-line.
  32. REM Call Router will answer after 10 rings.
  33. CALLROUT %1 rings 10
  34.  
  35. REM After 15 rings have been successfully counted...
  36. IF ERRORLEVEL 3 goto Event
  37.  
  38. REM Program timed out... caller hung up before 15 rings.
  39. IF ERRORLEVEL 2 goto Start
  40.  
  41. REM Program error condition!
  42. IF ERRORLEVEL 1 goto Error
  43.  
  44. REM Program ended normally...
  45. IF ERRORLEVEL 0 goto End
  46.  
  47. :Usage
  48. CLS
  49. ECHO.
  50. ECHO Please specify which COM port to use.
  51. ECHO Correct usage is: CRDEMO n
  52. ECHO            where: n = 1,2,3, or 4 (COM port to open)
  53. ECHO.
  54. goto End
  55.  
  56. :Event
  57. CLS
  58. ECHO.
  59. ECHO 10 rings were counted... insert your program here!
  60. ECHO.
  61. PAUSE
  62. goto Start
  63.  
  64. :Error
  65. ECHO.
  66. ECHO Call Router ended with an error!
  67. ECHO.
  68.  
  69. :End
  70.