home *** CD-ROM | disk | FTP | other *** search
- @echo off
- : DIAL - uses Hayes compatible modem as a telephone dialer.
- :
- : Dial saves the last number dialed in the environment variable
- : M_#. In addition if you terminate a number with a ";" Dial
- : will enter a loop allowing more numbers to be entered, this
- : is handy for accessing networks, or automated systems. If
- : dial detects a keypress before beginning dialing you are
- : prompted with the number and allowed to edit it.
- :
- : USAGE: Dial phone number
- : Dial <cr> ;redial last number
- :
- : History:
- : 15-Apr-92 MGiguere Fixed bug intercept always happening.
- : 09-Apr-92 MGiguere Added code to intercept before dialing and
- : allow editing.
- : 03-Feb-92 MGiguere Created.
- set port=com2:
- iff NOT ISALIAS while then
- alias while=`iff %& then`
- alias endw*hile=`goto %1^endiff`
- endiff
- iff "%1" NE "" then
- set M_#=%1
- endiff
- iff %@index[%[M_#],;] GE 0 then
- set doloop=t
- else
- set doloop=
- endiff
- inkey/w2 %%d
- iff "%d" NE "" then
- keystack "%[M_#]"
- input Edit number: %%[M_#]
- endiff
- iff .%doloop==. then
- at %port D%[M_#];H0
- goto done
- else
- at %port D%[M_#]
- endiff
- :loop
- while "%doloop" NE ""
- input More? [CR=done] enter number or %varname: %%doloop
- if "%doloop" NE "" at %port D%doloop;
- endw loop
- at %port H0
- :done
- unset port doloop d >& NUL
-
-