以下Teraterm+モデムで連続発信するサンプルマクロです
ATDxxxxxxxxxxx' のxxxxxxxxxxx を発信先の電話番号で書き換えてください。
:start
sendln 'ATDxxxxxxxxxxx'
timeout = 120
wait 'CONNECT' 'BUSY' 'NO CARRIER' 'BLACKLISTED' 'ERROR'
int2str str result
logwrite '[result]'
logwrite str
logwrite '[result]'
; pause 2 sec
pause 2
; timeout?
if result=0 goto error
; 'CONNECT'?
if result=1 goto conn
; 'BUSY'?
if result=2 goto error
; 'NO CARRIER'
if result=3 goto error
; 'BLACKLISTED'
if result=4 goto blacklisted
; 'ERROR'
if result=5 goto error1
:conn
;messagebox 'conn' 'Tera Term'
; pause 60 sec
logwrite '[START]'
pause 20
logwrite '[20s]'
pause 20
logwrite '[40s]'
pause 20
logwrite '[60s]'
r=0
:retry
pause 2
send '+++'
pause 2
logwrite '[send +++]'
timeout = 30
wait 'OK'
r=r+1
if r>=3 goto retryout
; timeout?
if result=0 goto retry
:retryout
logwrite '[retryout]'
sendln 'ATH'
wait 'OK'
pause 2
goto start
:error
sendln 'ATH'
wait 'OK'
pause 90
goto start
:blacklisted
sendln 'ATH'
wait 'OK'
pause 180
goto start
:error1
sendln 'ATH'
wait 'OK'
pause 5
goto start
最終更新:2008年06月20日 19:30