home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 10 / mycd10.iso / progs / tun / dos / emul / mac.arc / DIAL.MAC < prev    next >
Encoding:
Text File  |  1995-02-10  |  1.2 KB  |  65 lines

  1. # Dialing macro :
  2. # Must be used with a configuration with modem validated but no telephone
  3. # number.  To use only in case of modem problems
  4.  
  5. # modify the variable Number to change the dialing Number
  6. # For modems that needs initialisation strings, fill the variable InitString
  7. # The time out is 45 sec, change the last sendandreceive command if needed
  8.  
  9.  
  10. SET Number ""
  11. SET InitString ""
  12.  
  13. echo "Reseting Modem"
  14.  
  15. sendandreceive 5 "ATZ\r" "OK"
  16. IfError ResetFailed
  17. echo "Modem Reset Successfull"
  18. GetVar InitString
  19. IfEqual "" NoInit
  20. echo "Modem Initialisation"
  21. sendandreceive 5 %InitString "OK"
  22. IfError  InitFailed
  23. echo "Modem Initialisation Successfull"
  24.  
  25. Label NoInit
  26. GetVar Number
  27. IfEqual "" NoNumber
  28.  
  29. echo "Dialing 45 Sec..."
  30.  
  31. send "ATDT"
  32. send %Number
  33. sendandreceive 45 "\r" "CONNECT"
  34. ifequal "CONNECT" ConnectOk
  35. echo "Connection Failed, Check Error Message "
  36. pause 10
  37. return
  38.  
  39. Label ConnectOk
  40. echo "Connection Successfull"
  41. pause 5
  42. return
  43.  
  44. Label ResetFailed
  45. echo "Modem Reset Failed"
  46. pause 5
  47. Exit
  48.  
  49. Label InitFailed
  50. echo "Modem Init Failed"
  51. pause 5
  52. Exit
  53.  
  54. Label NoAnswer
  55. echo "No Answer From Remote Modem "
  56. pause 5
  57. Exit
  58.  
  59. Label NoNumber
  60. echo "No Number In The Macro "
  61. pause 5
  62. Exit
  63.  
  64.  
  65.