home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 March
/
VPR9803A.ISO
/
OLS
/
Windows
/
TTERMP22
/
dialup.tt_
/
dialup.tt
Wrap
Text File
|
1997-06-30
|
1KB
|
69 lines
; Sample macro for Tera Term
; Dial-up login
; open Tera Term
; command line = 'TERATERM /C=1' (COM1 port)
connect '/C=1'
DialPrefix = 'ATD'
; set phone number, username, and password
PhoneNumber = '0000000000'
UsernamePrompt = 'Username:'
Username = 'MYNAME'
PasswordPrompt = 'Password:'
; get password from file
getpassword 'password.dat' 'mypassword' Password
; initialize modem (see the manual for your modem)
sendln 'ATZ'
wait 'OK'
; dial up
:dial
send DialPrefix
sendln PhoneNumber
; set timeout (30 sec)
timeout = 30
; wait for strings from modem
wait 'CONNECT' 'BUSY' 'NO CARRIER'
; pause 2 sec
pause 2
; timeout?
if result=0 goto error
; 'CONNECT'?
if result=1 goto conn
; 'BUSY'?
if result=2 goto redial
; 'NO CARRIER'
if result=3 goto error
; error. stop macro
:error
messagebox 'Dialing error!' 'Tera Term'
end
:redial
yesnobox 'Busy! Try again?' 'Tera Term'
if result goto dial
end
; connect!
:conn
; login
wait UsernamePrompt
sendln Username
wait PasswordPrompt
sendln Password
; OK, auto login complete.