home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / callrt13.zip / CRDEMO.BAT < prev    next >
DOS Batch File  |  1993-03-10  |  2KB  |  70 lines

  1. @ECHO OFF
  2. CLS
  3. ECHO - Call Router V1.3 Demo -
  4. ECHO   For use with Unregistered version
  5. ECHO.
  6. ECHO This batch file demonstrates how Call Router V1.3
  7. ECHO may be used on a standard telephone...
  8. ECHO.
  9. ECHO  In this particular example, an event is executed when 15 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 V1.3 demonstrates only some of the features currently
  15. ECHO available in the registered-user version. Please consult the
  16. ECHO documentation for other features and ordering information.
  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 v1.3 will default to 2400 baud and answer after 15 rings.
  33. CALLROUT %1 rings 15
  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 15 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.