home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 199 / 4PHONE.ZIP / DIAL.BTM < prev    next >
Encoding:
Text File  |  1992-04-15  |  1.3 KB  |  52 lines

  1. @echo off
  2. :    DIAL - uses Hayes compatible modem as a telephone dialer.
  3. :
  4. :    Dial saves the last number dialed in the environment variable
  5. :    M_#.  In addition if you terminate a number with a ";" Dial
  6. :    will enter a loop allowing more numbers to be entered, this
  7. :    is handy for accessing networks, or automated systems. If
  8. :    dial detects a keypress before beginning dialing you are
  9. :    prompted with the number and allowed to edit it.
  10. :
  11. :    USAGE: Dial phone number
  12. :           Dial <cr>    ;redial last number
  13. :
  14. :    History:
  15. :    15-Apr-92    MGiguere    Fixed bug intercept always happening.
  16. :    09-Apr-92    MGiguere    Added code to intercept before dialing and 
  17. :                            allow editing.
  18. :    03-Feb-92    MGiguere    Created.
  19. set port=com2:
  20. iff NOT ISALIAS while then
  21.     alias while=`iff %& then`
  22.     alias endw*hile=`goto %1^endiff`
  23. endiff
  24. iff "%1" NE "" then
  25.     set M_#=%1
  26. endiff
  27. iff %@index[%[M_#],;] GE 0 then
  28.     set doloop=t
  29. else
  30.     set doloop=
  31. endiff
  32. inkey/w2 %%d
  33. iff "%d" NE "" then
  34.     keystack "%[M_#]"
  35.     input Edit number: %%[M_#]
  36. endiff
  37. iff .%doloop==. then
  38.     at %port D%[M_#];H0
  39.     goto done
  40. else
  41.     at %port D%[M_#]
  42. endiff
  43. :loop
  44. while "%doloop" NE ""
  45.     input More? [CR=done] enter number or %varname: %%doloop
  46.     if "%doloop" NE "" at %port D%doloop;
  47. endw loop
  48. at %port H0
  49. :done
  50. unset port doloop d >& NUL
  51.  
  52.