home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 January
/
VPR9701B.ISO
/
guiterm
/
mixnav
/
mixnav.pr_
/
mixnav.pr
Wrap
Text File
|
1995-09-24
|
46KB
|
2,597 lines
; Version : 1.1.0
;
; 日経MIX ナビゲータ
; 動作マクロ
;
end
INITIAL:
; マクロ完了をmix_base.dll へ通知するため
declare "MacroExit" "MIXBASE.DLL" NUM
declare "FilterOn" "MIXBASE.DLL" NUM
declare "ChatControl" "MIXBASE.DLL" NUM
declare "CheckDownload" "MIXBASE.DLL" STR
declare "RoomPassword" "MIXBASE.DLL" STR STR
declare "NewUserID" "MIXBASE.DLL" STR STR
declare "ConfLogClear" "MIXBASE.DLL" NUM
;
chrwait 1
timeout 60
mode SILENT
CDOFF LINEOFF
return
EXITLISTING:
send "q"+CR
case ":\w"
return
EXITCHAT:
send "/quit"+CR
case ":\w"
return
EXIT:
MacroExit 0
end
ERR_TIMEOUT:
PostNumMessage HWND CODE 101 0
goto EXIT
ERR_UID:
PostNumMessage HWND CODE 102 0
goto EXIT
LINEOFF:
PostNumMessage HWND CODE 103 0
goto EXIT
;------------------------------------------------------------------------------
BIZ_JOIN:
gosub INITIAL
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
send "biz"+CR
case "利用規則を承認しますか (y/n)?"
send "y"+CR
case "しばらくお待ち下さい。" "接続できません。"
goto BIZ_JOIN_OK *
PostNumMessage HWND CODE 90 0
case ":\w"
goto BIZ_JOIN_EXIT
BIZ_JOIN_OK:
PostNumMessage HWND CODE 1 0
FilterOn 1
;
case ">>\w"
;
FilterOn 0
BIZ_JOIN_EXIT:
MacroExit 0
PostNumMessage HWND CODE 0 0
end
BIZ_EXIT:
gosub INITIAL
send "BYE"+CR
case ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
TELNET_JOIN:
gosub INITIAL
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
send "telnet"+CR
case "telnet>"
goto TELNET_JOIN_OK *
PostNumMessage HWND CODE 90 0
goto TELNET_JOIN_EXIT
TELNET_JOIN_OK:
PostNumMessage HWND CODE 1 0
TELNET_JOIN_EXIT:
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
FTP_JOIN:
gosub INITIAL
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
send "ftp"+CR
case "ftp>"
goto FTP_JOIN_OK *
PostNumMessage HWND CODE 90 0
goto FTP_JOIN_EXIT
FTP_JOIN_OK:
PostNumMessage HWND CODE 1 0
FTP_JOIN_EXIT:
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_DOWNLOAD:
FilterOn 0
; send "n"+cr
; goto CONF_DOWNEND
ConfLogClear 0
CheckDownload "アタッチファイル"
send "y"+cr "n"+cr
goto * CONF_DOWNEND
sleep 2
protocol ZM
fopen "" BD
while binstatus == 1
wait 2
wend
wait 1
CONF_DOWNEND:
return
;------------------------------------------------------------------------------
CONF_MOVE:
;
; 会議室 指定メッセージへのポインター移動
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; SKIP : スキップ
; NUMBER: 読みだし番号
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
FilterOn 1
send "Head %s%d\r", SKIP, NUMBER
case ":\w"
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_NEXT:
;
; 会議室 次のメッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; MODE : 読み込み方向 ("FOR" or "BACK" or "")
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
if strlen(MODE) > 0 then
FilterOn 0
send MODE+cr
case ":\w"
endif
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfNext_End ConfNext_Bin ConfNext_End
ConfNext_Bin:
gosub CONF_DOWNLOAD
ConfNext_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_JOIN:
;
; 会議室への参加
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
send "q"+cr
cases ":\w"
if strlen(CONF) == 0 then
sendstr cr
else
if strlen(SUB) > 0 then
sendstr "Join "+CONF+"/"+SUB+cr
else
sendstr "Join "+CONF+cr
endif
endif
FilterOn 1
ConfJoin0:
; "room.xxxに参加するにはパスワードが必要です。参加しますか? (y/n)? "
cases "\n:\w" "\nR:\w" "分科会? \w" "(y/n)? "
send "" "" cr "" "\03"
goto * ConfJoin3 ConfJoin2 ConfJoin4 ConfJoin1
PostNumMessage HWND CODE 91 0
goto ConfJoin1
ConfJoin4:
PASS = ""
RoomPassword "" PASS
send "y"+cr "n"+cr
goto * ConfJoin1
cases "Password?:"
send PASS+cr "\03"
goto * ConfJoin1
; "パスワードが違います。もう一度入力して下さい。"
cases ":\w" "パスワードが"
send "" "\03"
goto ConfJoin3 * ConfJoin3
PostNumMessage HWND CODE 92 0
goto ConfJoin1
ConfJoin3:
PostNumMessage HWND CODE 90 0
goto ConfJoin1
ConfJoin2:
cases ":\w"
send "" "\03"
goto * ConfJoin1
PostNumMessage HWND CODE 90 0
ConfJoin1:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 100 0
end
;------------------------------------------------------------------------------
CONF_RESIGN:
;
; 会議室からの脱会
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
send "q"+cr
case ":\w"
if strlen(SUB) > 0 then
sendstr "Resign "+CONF+"/"+SUB+cr
else
sendstr "Resign "+CONF+cr
endif
ConfRes0:
cases ":\w" "(y/n)? N\08\w"
send "" "y"+cr ""
goto ConfRes1 * ConfRes1
PostNumMessage HWND CODE 90 0
ConfRes1:
MacroExit 0
PostNumMessage HWND CODE 100 0
end
;------------------------------------------------------------------------------
CONF_NEW_LIST:
;
; 未読会議室一覧取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Show New"+cr
cases ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_JOIN_LIST:
;
; 参加会議室一覧取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Show"+cr
cases ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_ALL_LIST:
;
; 全会議室一覧取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Show All"+cr
cases ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_NUMBER:
;
; 会議室 指定メッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; NUMBER: 読みだし番号
; SKIP : スキップチェック
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "%s%d", SKIP, NUMBER
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfNum_End ConfNum_Bin ConfNum_End
ConfNum_Bin:
gosub CONF_DOWNLOAD
ConfNum_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_DATE:
;
; 会議室 日付指定メッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; DATE : 読みだし日付
; SKIP : スキップチェック
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "%s date %s", SKIP, READDATE
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfDate_End ConfDate_Bin ConfDate_End
ConfDate_Bin:
gosub CONF_DOWNLOAD
ConfDate_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_OPTION:
;
; 会議室 指定メッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; COMMAND: 読みだし指定
; SKIP : スキップチェック
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "%s %s", SKIP, COMMAND
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfOpt_End ConfOpt_Bin ConfOpt_End
ConfOpt_Bin:
gosub CONF_DOWNLOAD
ConfOpt_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_FIND:
;
; 会議室 メッセージ検索
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; FROM : 検索開始
; TO : 最後
; FIND : 検索文字列
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
if strlen(FROM) == 0 && strlen(TO) == 0 then
send "%s \'%s\'", FINDNCD, FIND
else
if strlen(FROM) == 0 then
FROM = "1"
endif
if strlen(TO) == 0 then
TO = "last"
endif
send "%s %s to %s \'%s\'", FINDCMD, FROM, TO, FIND
endif
FilterOn 1
send cr
cases ":\w"
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_ORI:
;
; 会議室 コメント元メッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "or"
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfOri_End ConfOri_Bin ConfOri_End
ConfOri_Bin:
gosub CONF_DOWNLOAD
ConfOri_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_REF:
;
; 会議室 コメント先メッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "ref"
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfRef_End ConfRef_Bin ConfRef_End
ConfRef_Bin:
gosub CONF_DOWNLOAD
ConfRef_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_COMMENT:
;
; コメント送信
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; HMEM : 送信データ (GlobalHandle)
; CONF : 会議室名
; SUB : 分科会名
; NUMBER : コメント元番号
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "Clear"+cr
case ":\w"
if NUMBER > 0 then
send "com %d\r", NUMBER
else
send "com"+cr
endif
; FilterOn 1
case "\n\w"
SendHandle HMEM 1
Retry_Comment:
case "\n\w" "A:\w" "Rf:\w" "R:\w" "RB:\w"
send "."+cr "" "" "" "" ""
goto Retry_Comment * Coment_End Coment_End Coment_End ERR_TIMEOUT
if strlen(FILE) == 0 then
goto Send_Com_Add
endif
send "attach"+cr
case "は? \w" " )? "
goto * * ERR_TIMEOUT
send FNAME+cr
case "ZMODEM"
wait 1
protocol ZM
fopen FILE BU
while binstatus == 1
wait 2
wend
wait 1
if binerror < 0 then
PostNumMessage HWND CODE 101 0
send "q"+cr
goto Coment_End
endif
Send_Com_Add:
send "A"+cr
case ":\w"
Coment_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
goto EXIT
;------------------------------------------------------------------------------
CONF_SAY:
;
; 発言送信
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; SUBJECT:タイトル
; HMEM : 送信データ (GlobalHandle)
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
send "Clear"+cr
case ":\w"
FilterOn 1
send "Say"+cr
case "標題:"
send SUBJECT+cr ""
goto * ERR_TIMEOUT
case "\n\w"
SendHandle HMEM 1
Retry_Say:
case "\n\w" "A:\w"
send "."+cr "" ""
goto Retry_Say * ERR_TIMEOUT
if strlen(FILE) == 0 then
goto Send_Say_Add
endif
send "attach"+cr
case "は? \w" " )? "
goto * * ERR_TIMEOUT
send FNAME+cr
case "ZMODEM"
wait 1
protocol ZM
fopen FILE BU
while binstatus == 1
wait 2
wend
wait 1
if binerror < 0 then
PostNumMessage HWND CODE 101 0
send "q"+cr
goto Conf_Say_Err
endif
Send_Say_Add:
send "A"+cr
case ":\w"
Conf_Say_Err:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
goto EXIT
;------------------------------------------------------------------------------
CONF_LAST:
;
; 会議室 最後のメッセージ読みだし
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; SKIP : ポインター移動
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "Last"
FilterOn 1
send cr
cases ":\w" "(y/n)? N\08"
goto ConfLast_End ConfLast_Bin ConfLast_End
ConfLast_Bin:
gosub CONF_DOWNLOAD
ConfLast_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CONF_DEL:
;
; 会議室 指定メッセージ削除
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; CONF : 会議室名
; SUB : 分科会名
; NUMBER: 削除番号
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
if strlen(CONF) > 0 then
send "Join "+CONF+"/"+SUB+cr
case ":\w"
endif
send "wi %d\r", NUMBER
Del_Check:
case ":\w" "(y/n)? "
send "" "y"+cr
goto * Del_Check
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
MAIL_NEW_LIST:
;
; 電子メール 未読メール一覧取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Mail"+cr
cases ":\w"
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
MAIL_SEND:
;
; MAIL 送信
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; UID : 送信先ID (配列)
; SUBJECT:タイトル
; HMEM : 送信データ (GlobalHandle)
; FILE : 添付ファイル名
; FNAME : MIXへ通知するファイル名
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
send "Clear"+cr
case ":\w"
send "Mail to "+UID[0]+cr
case "標題を入れて下さい:" "相手先がありません。"
send SUBJECT+cr "" ""
goto * ERR_UID ERR_TIMEOUT
case "\n\w"
SendHandle HMEM 1
Retry_Send:
case "\n\w" "action:\w"
send "."+cr "" ""
goto Retry_Send Send_Attach ERR_TIMEOUT
Send_Attach:
if strlen(FILE) == 0 then
goto Send_CC
endif
send "attach"+cr
case "は? \w" " )? "
goto * * ERR_TIMEOUT
send FNAME+cr
case "ZMODEM"
wait 1
protocol ZM
fopen FILE BU
while binstatus == 1
wait 2
wend
wait 1
if binerror < 0 then
PostNumMessage HWND CODE 101 0
send "q"+cr
goto MAIL_SEND_ERR
endif
Send_CC:
n = 1
while strlen(UID[n]) > 0
send "CC "+UID[n]+cr
case ":\w"
n = n+1
wend
send "send"+cr
MAIL_SEND_ERR:
case ":\w"
MacroExit 0
; PostNumMessage HWND CODE 0 0
goto EXIT
;------------------------------------------------------------------------------
MAIL_REPLAY:
;
; MAIL コメント送信
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; MID : コメント元メール番号
; HMEM : 送信データ (GlobalHandle)
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Clear"+cr
case ":\w"
send "Mail Rep "+str(MID)+cr
case "\n\w"
SendHandle HMEM 1
Retry_Rep:
case "\n\w" "action:\w" "(y/n)?"
send "."+cr "send"+cr "n"+cr ""
goto Retry_Rep * Retry_Rep ERR_TIMEOUT
case ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
goto EXIT
;------------------------------------------------------------------------------
MAIL_FORWARD:
;
; MAIL 転送
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; ID : 転送元メールID
; UID : 送信先ID (配列)
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
send "file Mail %d\r", ID
case ":\w"
chrwait 0
n = 0
while strlen(UID[n]) > 0
send "for "+UID[n]+cr
case ":\w"
send "send"+cr
case ":\w"
n = n+1
wend
send "q"+cr
; case ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
goto EXIT
;------------------------------------------------------------------------------
MAIL_READ:
;
; MAIL 本文読み出し
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; ID : 取得メール番号
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Mail "+str(ID)+cr
Endcheck:
cases ":\w" "(y/n)? Y\08"
goto Mail_End Mail_Bin Mail_End
Mail_Bin:
FilterOn 0
CheckDownload ""
send "y"+cr "n"+cr
goto * Endcheck
sleep 2
protocol ZM
fopen "" BD
while binstatus == 1
wait 2
wend
wait 1
Mail_End:
FilterOn 0
send "q"+cr
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
MAIL_INBASK:
;
; 電子メール 受信メール一覧取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
send "Mail Inbask"+cr
cases ":\w"
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
MAIL_OUTBASK:
;
; 電子メール 送信済みメール一覧取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
;
send "Mail Outbask"+cr
cases ":\w"
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
MAIL_DELETE:
;
; MAIL 削除
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; ID : 削除メール番号
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
send "Mail del "+str(ID)+cr
DeleteRetry:
cases ":\w" "y/n)? "
send "" "y"+cr
goto * DeleteRetry *
PostNumMessage HWND CODE 1 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
GOTO_CHAT:
;
; チャットへ入る
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; NAME : チャットでの名前
; MSG : メッセージ
; CHANEL : チャネル番号
; BAND : バンド
;
gosub INITIAL
;
FilterOn 0
ChatControl 0
if LISTING then
gosub EXITLISTING
endif
send "q"+cr
goto_chat0:
case ":\w"
sendstr "cbix"+cr
goto_chat1:
case "dumb ですか? (y/n/q): \w" "(y/n/q): \w" "<CR> で続きを..." "Reserved." "R:\w" "下さい: "
send "y"+cr "n"+cr cr "" "q"+cr "dumb"+cr" ""
goto goto_chat3 goto_chat2 goto_chat1 goto_chat5 goto_chat0 goto_chat3 ERR_TIMEOUT
; profle Save済み
goto_chat5:
wait 1
if strlen(NAME) > 0 then
send "/alias \""+NAME+"\""+cr
case "\n\w"
endif
send "/band "+BAND+cr
case "\n\w"
send "/chanel %d\r", CHANEL
goto goto_chat6
goto_chat2:
case "下さい: "
send "dumb"+cr ""
goto * ERR_TIMEOUT
goto_chat3:
case "下さい。: " "Reserved."
send BAND+cr "" ""
goto * goto_chat5 ERR_TIMEOUT
case "? (y/n): "
goto * ERR_TIMEOUT
if strlen(NAME) > 0 then
sendstr "y"+cr
case "下さい: "
send NAME+cr ""
goto * ERR_TIMEOUT
else
sendstr "n"+cr
endif
case "下さい。: "
send "%d\r", CHANEL ""
goto * ERR_TIMEOUT
case "下さい。: "
send cr ""
goto * ERR_TIMEOUT
goto_chat6:
case "\n\w"
send "/beep off"+cr
case "\n\w"
send "/echo off"+cr
case "\n\w"
ChatControl 1
if strlen(MSG) > 0 then
send MSG+cr
endif
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
CHAT_CHAGNE:
;
; チャットでの状態変更
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; NAME : チャットでの名前
; MSG : メッセージ
; CHANEL : チャネル番号
; BAND : バンド
;
gosub INITIAL
;
; 名前変更
if strlen(NAME) > 0 then
send "/alias \""+NAME+"\""+cr
case "許可されていません" "予約語です" "変わりました"
wait 1
endif
; バンド変更
if strlen(BAND) > 0 then
send "/band "+BAND+cr
case "ようこそ" "ヘルプは"
wait 1
endif
; チャネル変更
if CHANEL > 0 then
send "/chanel %d\r", CHANEL
case "ようこそ" "ヘルプは"
; wait 1
endif
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
WHO:
;
; 参加ユーザー名取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
send "Who"+cr
cases ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
GET_RESUME:
;
; ユーザープロフィール取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; USER : ユーザ名
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
send "Show Resume "+USER+cr
cases ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
SET_RESUME:
;
; ユーザープロフィール設定
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; HMEM : 送信データ (GlobalHandle)
;
gosub INITIAL
;
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
FilterOn 1
send "edit Resume"+cr
case ":\w"
send "1,$d"+cr
case ":\w"
send "i"+cr
SendHandle HMEM 1
send "."+cr
cases ":\w"
send "w"+cr
case ":\w"
send "q"+cr
case ":\w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
LIB_MAIN_LIST:
;
; Listing メインエリア名称取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
;
gosub INITIAL
;
FilterOn 0
if CHAT then
gosub EXITCHAT
endif
if LISTING == 0 Then
send "Join Listings"+cr
cases ": \w"
endif
;
FilterOn 1
send "area ?"+cr
cases ":\w" ": \w"
send cr
cases ": \w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
LIB_SUB_LIST:
;
; Listing サブエリア名称取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; MAIN : メインエリア名
;
gosub INITIAL
;
FilterOn 0
if CHAT then
gosub EXITCHAT
endif
if LISTING == 0 Then
send "Join Listings"+cr
cases ": \w"
endif
;
if strlen(MAIN) > 0 Then
send "area "+MAIN+cr
cases ": \w" "\nそのような"
goto * Lib_Area_Error Lib_Area_TIMEOUT
endif
send "Subarea ?"
FilterOn 1
send cr
cases ":\w" ": \w" ")? \w"
goto GetSub_End GetSub_End * *
FilterOn 0
send "ALL"+cr
cases ":\w" ": \w"
GetSub_End:
FilterOn 0
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
LIB_FILE_LIST:
;
; Listing ファイル名一覧
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; MAIN : MAINグループ
;
gosub INITIAL
;
FilterOn 0
if CHAT then
gosub EXITCHAT
endif
if LISTING == 0 Then
send "Join Listings"+cr
cases ": \w"
endif
;
if strlen(MAIN) > 0 Then
send "area "+MAIN+cr
cases ": \w" "\nそのような"
goto * Lib_Area_Error Lib_Area_TIMEOUT
endif
if strlen(SUB) > 0 Then
send "Subarea "+SUB+cr
cases ": \w" "\nそのような"
goto * Lib_Area_Error Lib_Area_TIMEOUT
endif
send "Find All"+cr
cases ": \w"
send "short"+cr
cases ": \w"
FilterOn 1
send "disp"+cr
cases ": \w"
send "q"+cr
cases ": \w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
Lib_Area_Error:
Lib_Area_TIMEOUT:
wait 1
sendstr cr
MacroExit 0
PostNumMessage HWND CODE 110 0
end
;------------------------------------------------------------------------------
LIB_FILE_INFO:
;
; Listing ファイル概要取得
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; MAIN : MAINグループ
; ID : 読み出し番号
;
gosub INITIAL
;
FilterOn 0
if CHAT then
gosub EXITCHAT
endif
if LISTING == 0 Then
send "Join Listings"+cr
cases ": \w"
endif
;
if strlen(MAIN) > 0 Then
send "area "+MAIN+cr
cases ": \w"
endif
if strlen(SUB) > 0 Then
send "Subarea "+SUB+cr
cases ": \w" "\nそのような"
goto * Lib_Area_Error Lib_Area_TIMEOUT
endif
send "Find %d\r", ID
cases ": \w"
send "long"+cr
cases ": \w"
FilterOn 1
send "disp"+cr
cases ": \w"
FilterOn 0
send "q"+cr
cases ": \w"
MacroExit 0
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
LIB_FILE_RECEIVE:
;
; Listing ファイルダウンロード
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; MAIN : MAINグループ
; ID : 読み出し番号
;
gosub INITIAL
;
FilterOn 0
if CHAT then
gosub EXITCHAT
endif
if LISTING == 0 Then
send "Join Listings"+cr
cases ": \w"
endif
;
if strlen(MAIN) > 0 Then
send "area "+MAIN+cr
cases ": \w"
endif
if strlen(SUB) > 0 Then
send "Subarea "+SUB+cr
cases ": \w" "\nそのような"
goto * Lib_Area_Error Lib_Area_TIMEOUT
endif
send "Option receive z q"+cr
cases ": \w"
send "receive %d\r", ID
wait 1
protocol ZM
fopen "" BD
wait 1
while binstatus == 1
wait 1
wend
; if binerror != 1 then
; PostNumMessage HWND CODE 101 0
; endif
sendstr cr
cases ": \w"
MacroExit 0
; PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
LIB_UPLOAD:
;
; Listing ファイルアップロード
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; MAIN : MAINグループ
; SUB : SUBグループ
; FILE : ファイル名 フルパス
; FNAME : ファイル名
; SUBJECT : タイトル
; MSG : メッセージ
; KEY : キーワード
;
gosub INITIAL
;
FilterOn 0
if CHAT then
gosub EXITCHAT
endif
if LISTING == 0 Then
send "Join Listings"+cr
cases ": \w"
endif
;
if strlen(MAIN) > 0 Then
send "area "+MAIN+cr
cases ": \w"
endif
if strlen(SUB) > 0 Then
send "Subarea "+SUB+cr
cases ": \w"
endif
send "Option send z q"+cr
case ": \w"
send "send"+cr
FnameSet:
case "File? " "subarea: \w" "サブエリアはありません" "一覧は?): \w"
send FNAME+cr SUB+cr "" "" ""
goto * FnameSet SubArea_ERR SubArea_ERR SubArea_ERR
case "y or n): "
send "n"+cr
case "ZMODEM"
wait 1
protocol ZM
fopen FILE BU
while binstatus == 1
wait 2
wend
if binerror < 0 then
PostNumMessage HWND CODE 2 0
wait 1
send "\03"
goto LIB_SEND_ERR
endif
timeout 1
case ">\w" "\n\w"
timeout 60
SendHandle MSG 1
timeout 2
case ">\w"
send cr
timeout 5
case ">\w"
send "."+cr
case "y/n)?: "
send "n"+cr
; case "入力が"
n = 0
case ">\w" "\n\w"
while strlen(KEY[n]) > 0
send KEY[n]+cr
n = n+1
case ">\w" "\n\w"
wend
send "."+cr
MacroExit 0
PostNumMessage HWND CODE 1 0
end
SubArea_ERR:
wait 1
send "\03"
MacroExit 0
PostNumMessage HWND CODE 101 0
end
;------------------------------------------------------------------------------
CHG_PASSWORD:
;
; パスワード変更
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; OLD : 旧パスワード
; NEW : 新パスワード
gosub INITIAL
FilterOn 0
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
send "q"+cr
case ":"
send "password"+cr
case "古いパスワード:"
send OLD+cr
case "新しいパスワード:" "不適当です" "\n:"
goto * CHGPASS_ERR CHGPASS_ERR CHGPASS_ERR
send NEW+cr
case "新しいパスワード:" "再入力:"
goto NON_CHG_PASS * CHGPASS_ERR
send NEW+cr
case ":\w"
PostNumMessage HWND CODE 1 0
MacroExit 1
goto CHGPASS_END
NON_CHG_PASS:
send OLD+cr
case "新しいパスワード:" "再入力:"
goto CHGPASS_ERR * CHGPASS_ERR
send OLD+cr
case ":\w"
CHGPASS_ERR:
MacroExit 0
CHGPASS_END:
PostNumMessage HWND CODE 0 0
end
;------------------------------------------------------------------------------
MIX_LOGIN:
;
; MIX オートログインマクロ
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; UID : ID
; UPASSWD : パスワード
; PHONE : "T" or "P"
; MODEM : モデム初期化コマンド
; NUMBER : 電話番号
; COUNT : リトライ回数
; WAIT : リトラリ間隔
; TYPE : アクセスポイントタイプ (0:東京 1:地方AP)
; ZERO : 0 発信
; ABORT : 強制中断
; GATEWAY : "PCVAN" or "NIFTY"
; GWID : ID
; GWPASS : パスワード
;
; 通信ポートパラメータ設定
; 9600/8/s1/Non/S-JIS/BS/Log-FileNon
;
; setparam 1 0 7
setparam 1 1 1
setparam 1 2 0
setparam 1 3 2
setparam 2 3 0
setparam 2 4 1
setparam 3 3 0
if ABORT == 1 then
goto LOGIN_ABORT
endif
; if GATEWAY == "TELNET" then
if TYPE == 4 then
setparam 6 0 15
endif
popen
PostNumMessage HWND CODE 1 0
sleep 2
; モデム初期化
timeout 3
chrwait 1
send "AT"+cr
case "OK" "n:" ":" "?)"
send "" "quit"+cr "bye"+cr "quit"+cr ""
goto MODEM_OK * * * MODEM_ERR
timeout 10
Re_bye:
if ABORT == 1 then
goto LOGIN_ABORT
endif
case "NO " "R:\w" "M:\w" ":\w" "?)"
send "" "bye"+cr "bye"+cr "bye"+cr "quit"+cr ""
goto * Re_bye Re_bye Re_bye Re_bye MODEM_ERR
timeout 3
wait 1
send "AT"+cr
case "OK"
goto * MODEM_ERR
MODEM_OK:
PostNumMessage HWND CODE 2 0
if ABORT == 1 then
goto LOGIN_ABORT
endif
; if GATEWAY == "TELNET" then
if TYPE == 4 then
goto MODEM_INI_OK
endif
send "AT"+MODEM+cr
case "OK" "ERROR"
goto MODEM_INI_OK * MODEM_ERR
wait 1
send "ATZ"+cr
case "OK" "ERROR"
goto MODEM_INI_OK MODEM_ERR MODEM_ERR
MODEM_INI_OK:
PostNumMessage HWND CODE 3 0
if ABORT == 1 then
goto LOGIN_ABORT
endif
n = COUNT
sleep 1
Retry_Login:
timeout 60
PostNumMessage HWND CODE 5 0
; if GATEWAY == "TELNET" then
if TYPE == 4 then
sendstr "ATD "+NUMBER+cr
else
sendstr "ATD"+PHONE
if ZERO == 1 then
sendstr "0,,"
endif
sendstr NUMBER+cr
endif
case "CONNECT" "BUSY" "NO " "ERROR" "OK"
goto CONNECT * * * * CONNECT_ERR
stat = result
if ABORT == 1 then
goto LOGIN_ABORT
endif
n = n-1
if n > 0 then
PostNumMessage HWND CODE 4 0
i = WAIT
while i > 0
wait 1
if ABORT == 1 then
goto LOGIN_ABORT
endif
i = i-1
wend
goto Retry_Login
endif
result = stat
goto CONNECT_ERR CONNECT_ERR CONNECT_ERR CONNECT_ERR CONNECT_ERR
CONNECT:
PostNumMessage HWND CODE 6 0
switch GATEWAY "OTHERAP" "TYMPAS" "TRIP" "PCVAN" "NIFTY"
goto * GW_TYMPAS GW_TRIP GW_PCVAN GW_NIFTY MIX_LOGIN_START
; 地方アクセスポイント
send " P"+cr
case "NIKKEI" "NO "
goto * CONNECT_ERR
wait 1
send "C MIX"+cr
MIX_LOGIN_START:
setdir 0 LOGPATH
setdir 1 DOWNPATH
if DATELOG == 0 then
LOGNAME = LOGFILE
endif
setparam 3 3 MAKELOG
case "enter \"mix\"): " "login: " "NO CA"
goto * * LOGIN_ERR LOGIN_ERR
sendstr "mix"+cr
PostNumMessage HWND CODE 7 0
case "Name? " "NO CA" "保守作業"
goto * LOGIN_ERR MENT_STOP ID_ERR
send UID+CR
; PostNumMessage HWND CODE 8 0
case "Password: " "NO " "既に" "Name? "
Goto * LOGIN_ERR PASSWORD_ERROR PASSWORD_ERROR PASSWORD_ERROR
send UPASSWD+CR
PostNumMessage HWND CODE 8 0
chrwait 1
LOGON_RECHECK:
case ":\w" "(?はヘルプ): " "Name? " ".More..\w"
goto OPTION_SET MENU_OFF PASSWORD_ERROR LOGON_MORE PROMPT_ERR
LOGON_MORE:
wait 1
send cr
goto LOGON_RECHECK
MENU_OFF:
send "8"+cr
case ":\w"
OPTION_SET:
send "opt terse term pagelen 0 term width 90 term tty q"+cr
case ":\w"
send "opt head 0 mail call yes down zmodem up zmodem q"+cr
case ":\w"
send "opt edit quiet autodownload y mymessage yes q"+cr
case ":\w"
send "opt resume yes q"+cr
PostNumMessage HWND CODE 9 0
case ":\w"
end
LOGIN_ABORT:
PostNumMessage HWND CODE 107 0
goto LOGIN_EXIT
MENT_STOP:
PostNumMessage HWND CODE 106 0
goto LOGIN_EXIT
PROMPT_ERR:
PostNumMessage HWND CODE 105 0
goto LOGIN_EXIT
PASSWORD_ERROR:
;パスワードエラーの場合には強制切断を行う
gosub Hungup
PostNumMessage HWND CODE 104 0
goto LOGIN_EXIT
ID_ERR:
PostNumMessage HWND CODE 103 0
goto LOGIN_EXIT
LOGIN_ERR:
PostNumMessage HWND CODE 102 0
goto LOGIN_EXIT
CONNECT_ERR:
PostNumMessage HWND CODE 101 0
goto LOGIN_EXIT
MODEM_ERR:
PostNumMessage HWND CODE 100 0
goto LOGIN_EXIT
LOGIN_EXIT:
pclose
end
; 強制的に回線を切断する
Hungup:
wait 1
send "+"
send "+"
send "+"
case "OK" "NO "
wait 1
send "ATH0"+cr "" ""
Hungup_END:
return
;
; TYMPAS 経由
GW_TYMPAS:
case "f" "log in: " "connected"
send "I" GWID+":584;"+GWPASS+CR "" ""
goto GW_TYMPAS GW_TYMPAS MIX_LOGIN_START LOGIN_ERR
;
; Tri-P 経由
GW_TRIP:
wait 2
send "@"
wait 1
send CR
case "*"
goto * LOGIN_ERR
send "N"+GWID+GWPASS+"-MIX"+CR
case "TED" "*\w"
goto MIX_LOGIN_START LOGIN_ERR LOGIN_ERR
; PC-VAN 経由の接続
GW_PCVAN:
CHRWAIT 0
wait 5
timeout 60
send "PCVAN"+CR
PCVAN_LOGIN:
case "ID: " "ワード: " "(Y,N,GW)=\w" "(Y,N)=\w" "システムチョウセイノタメ" "タダイマ カイセンハ" "NO "
send GWID+CR GWPASS+CR "N"+CR "N"+CR "" "" "" ""
goto PCVAN_LOGIN PCVAN_LOGIN PCVAN_LOGIN * LOGIN_ERR LOGIN_ERR LOGIN_ERR LOGIN_ERR
case "(H,Q,J)=\w"
send "jINETTEL"+cr
case "(H,Q,E,J)=\w"
send "2"+cr
case "telnet> "
send "open mix.or.jp"+cr
goto MIX_LOGIN_START
;------------------------------------------------------------------------------
MIX_LOGOUT:
;
; ログアウト
;
chrwait 1
;
gosub INITIAL
;
FilterOn 0
if cd != 1 then
goto Logout_End
endif
if LISTING then
gosub EXITLISTING
endif
if CHAT then
gosub EXITCHAT
endif
;
Retry_Out:
if cd != 1 then
goto Logout_End
endif
send "bye"+cr
case "NO CA" ":\w" "(y/n)? Y\08\w" "(y/n)?" "E:\w" "J)=\w" "log in:\w" "\n*\w"
send "" "q"+cr "no"+cr "n"+cr "w"+cr "q"+cr "" "" ""
goto * Retry_Out Retry_Out Retry_Out Retry_Out Retry_Out TYMPAS_OUT TRIP_OUT *
Logout_End:
setparam 3 3 0
wait 1
pclose
end
TYMPAS_OUT:
TRIP_OUT:
send "+"
send "+"
send "+"
case "OK"
send "ATH0"+cr ""
goto Logout_End Logout_End
;------------------------------------------------------------------------------
MIX_LOGIN_NEWUSER:
;
; MIX オートログインマクロ(新規入会)
;
; HWND : 通知先ウィンドウ
; CODE : 通知コード
; UID : ID(ユーザー指定IDがあれば)
; UPASSWD : パスワード
; PHONE : "T" or "P"
; MODEM : モデム初期化コマンド
; NUMBER : 電話番号
; COUNT : リトライ回数
; WAIT : リトラリ間隔
; TYPE : アクセスポイントタイプ (0:東京 1:地方AP)
; ZERO : 0 発信
; ABORT : 強制中断
; GATEWAY : "PCVAN" or "NIFTY"
; GWID : ID
; GWPASS : パスワード
;
; TEMPNAME : MIX番号(入会登録用)
; TEMPPASS : 仮パスワード
;
; 通信ポートパラメータ設定
; 9600/8/s1/Non/S-JIS/BS/Log-FileNon
;
gosub INITIAL
; setparam 1 0 7
setparam 1 1 1
setparam 1 2 0
setparam 1 3 2
setparam 2 3 0
setparam 2 4 1
setparam 3 3 0
if ABORT == 1 then
goto LOGIN_ABORT
endif
; if GATEWAY == "TELNET" then
if TYPE == 4 then
setparam 6 0 15
endif
popen
PostNumMessage HWND CODE 1 0
sleep 2
; モデム初期化
timeout 3
chrwait 1
send "AT"+cr
case "OK" "n:" ":" "?)"
send "" "quit"+cr "bye"+cr "quit"+cr ""
goto NEWUSER_MODEM_OK * * * NEWUSER_MODEM_ERR
timeout 10
NEWUSER_RE_BYE:
if ABORT == 1 then
goto NEWUSER_LOGIN_ABORT
endif
case "NO " "R:\w" "M:\w" ":\w" "?)"
send "" "bye"+cr "bye"+cr "bye"+cr "quit"+cr ""
goto * NEWUSER_RE_BYE NEWUSER_RE_BYE NEWUSER_RE_BYE NEWUSER_RE_BYE NEWUSER_MODEM_ERR
timeout 3
wait 1
send "AT"+cr
case "OK"
goto * NEWUSER_MODEM_ERR
NEWUSER_MODEM_OK:
PostNumMessage HWND CODE 2 0
if ABORT == 1 then
goto NEWUSER_LOGIN_ABORT
endif
; if GATEWAY == "TELNET" then
if TYPE == 4 then
goto NEWUSER_MODEM_INI_OK
endif
send "AT"+MODEM+cr
case "OK" "ERROR"
goto NEWUSER_MODEM_INI_OK * NEWUSER_MODEM_ERR
wait 1
send "ATZ"+cr
case "OK" "ERROR"
goto NEWUSER_MODEM_INI_OK NEWUSER_MODEM_ERR NEWUSER_MODEM_ERR
NEWUSER_MODEM_INI_OK:
PostNumMessage HWND CODE 3 0
if ABORT == 1 then
goto NEWUSER_LOGIN_ABORT
endif
n = COUNT
sleep 1
NEWUSER_RETRY_LOGIN:
timeout 60
PostNumMessage HWND CODE 5 0
; if GATEWAY == "TELNET" then
if TYPE == 4 then
sendstr "ATD "+NUMBER+cr
else
sendstr "ATD"+PHONE
if ZERO == 1 then
sendstr "0,,"
endif
sendstr NUMBER+cr
endif
case "CONNECT" "BUSY" "NO " "ERROR" "OK"
goto NEWUSER_CONNECT * * * * NEWUSER_CONNECT_ERR
stat = result
if ABORT == 1 then
goto NEWUSER_LOGIN_ABORT
endif
n = n-1
if n > 0 then
PostNumMessage HWND CODE 4 0
i = WAIT
while i > 0
wait 1
if ABORT == 1 then
goto NEWUSER_LOGIN_ABORT
endif
i = i-1
wend
goto NEWUSER_RETRY_LOGIN
endif
result = stat
goto NEWUSER_CONNECT_ERR NEWUSER_CONNECT_ERR NEWUSER_CONNECT_ERR NEWUSER_CONNECT_ERR NEWUSER_CONNECT_ERR
NEWUSER_CONNECT:
PostNumMessage HWND CODE 6 0
switch GATEWAY "OTHERAP" "PCVAN" "NIFTY"
goto * NEWUSER_GW_PCVAN NEWUSER_GW_NIFTY NEWUSER_MIX_LOGIN_START
; 地方アクセスポイント
send " P"+cr
case "NIKKEI" "NO "
goto * NEWUSER_CONNECT_ERR
wait 1
send "C MIX"+cr
NEWUSER_MIX_LOGIN_START:
setdir 0 LOGPATH
setdir 1 DOWNPATH
if DATELOG == 0 then
LOGNAME = LOGFILE
endif
setparam 3 3 MAKELOG
case "enter \"mix\"): " "login: " "NO CA"
goto * * NEWUSER_LOGIN_ERR NEWUSER_LOGIN_ERR
sendstr "mix"+cr
PostNumMessage HWND CODE 7 0
case "Name? " "NO CA" "保守作業"
goto * NEWUSER_LOGIN_ERR NEWUSER_MENT_STOP NEWUSER_ID_ERR
send "new"+cr
case "\r\n登録しますか (y/n)? "
send "y"+CR ""
goto * NEWUSER_LOGIN_ERR
NewStart:
case "\r\nMIX 番号:" "\r\n仮パスワード:"
send TEMPNAME+CR TEMPPASS+CR ""
goto NewStart * NEWUSER_LOGIN_ERR
NewName:
case "\r\n姓:" "\r\n名:"
send Name1+CR Name2+CR ""
goto NewName * NEWUSER_LOGIN_ERR
case "\r\nこれでよろしいですか (y/n)?"
send "y"+CR ""
goto * NEWUSER_LOGIN_ERR
case "MIX での名前"
goto * NEWUSER_LOGIN_ERR
YesNo = "y"
if strlen(UID) > 0 then
YesNo = "n"
endif
case "\r\nこれでよろしいですか (y/n)?"
send YesNo+CR ""
goto * NEWUSER_LOGIN_ERR
if YesNo == "y" then
goto NewName_OK
endif
case "\r\nニックネーム:"
goto * NEWUSER_LOGIN_ERR
NewName_Org:
send UID+CR
case "\r\nこれでよろしいですか (y/n)?" "別の名前を考えて下さい。"
send "y"+CR "" ""
goto NewName_OK * NEWUSER_LOGIN_ERR
case "\r\nニックネーム:"
goto * NEWUSER_LOGIN_ERR
; すでに指定ニックネームが使われている場合
NewUserID UID UID
goto NewName_Org NEWUSER_LOGIN_ERR
NewName_OK:
case "-->\w"
send RESUME1+CR ""
goto * NEWUSER_LOGIN_ERR
case "-->\w"
send RESUME2+CR ""
goto * NEWUSER_LOGIN_ERR
case "-->\w"
send RESUME3+CR ""
goto * NEWUSER_LOGIN_ERR
case "\r\nこれでよろしいですか (y/n)?"
send "y"+CR ""
goto * NEWUSER_LOGIN_ERR
case "\r\n新しいパスワード:"
send UPASSWD+CR ""
goto * NEWUSER_LOGIN_ERR
case "\r\n新しいパスワード:"
send UPASSWD+CR ""
goto * NEWUSER_LOGIN_ERR
PostNumMessage HWND CODE 8 0
chrwait 1
NEWUSER_LOGON_RECHECK:
case ":\w" "(?はヘルプ): " "Name? " ".More..\w"
goto NEWUSER_OPTION_SET NEWUSER_MENU_OFF NEWUSER_PASSWORD_ERROR NEWUSER_LOGON_MORE PROMPT_ERR
NEWUSER_LOGON_MORE:
wait 1
send cr
goto NEWUSER_LOGON_RECHECK
NEWUSER_MENU_OFF:
send "8"+cr
case ":\w"
NEWUSER_OPTION_SET:
send "opt terse term pagelen 0 term width 90 term tty q"+cr
case ":\w"
send "opt head 0 mail call yes down zmodem up zmodem q"+cr
case ":\w"
send "opt edit quiet autodownload y mymessage yes q"+cr
PostNumMessage HWND CODE 9 0
case ":\w"
end
NEWUSER_LOGIN_ABORT:
PostNumMessage HWND CODE 107 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_MENT_STOP:
PostNumMessage HWND CODE 106 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_PROMPT_ERR:
PostNumMessage HWND CODE 105 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_PASSWORD_ERROR:
;パスワードエラーの場合には強制切断を行う
gosub Hungup
PostNumMessage HWND CODE 104 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_ID_ERR:
PostNumMessage HWND CODE 103 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_LOGIN_ERR:
gosub Hungup
PostNumMessage HWND CODE 102 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_CONNECT_ERR:
PostNumMessage HWND CODE 101 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_MODEM_ERR:
PostNumMessage HWND CODE 100 0
goto NEWUSER_LOGIN_EXIT
NEWUSER_LOGIN_EXIT:
pclose
end
; PC-VAN 経由の接続
NEWUSER_GW_PCVAN:
CHRWAIT 0
wait 5
timeout 60
send "PCVAN"+CR
NEWUSER_PCVAN_LOGIN:
case "ID: " "ワード: " "(Y,N,GW)=\w" "(Y,N)=\w" "システムチョウセイノタメ" "タダイマ カイセンハ" "NO "
send GWID+CR GWPASS+CR "N"+CR "N"+CR "" "" "" ""
goto NEWUSER_PCVAN_LOGIN NEWUSER_PCVAN_LOGIN NEWUSER_PCVAN_LOGIN * NEWUSER_LOGIN_ERR NEWUSER_LOGIN_ERR NEWUSER_LOGIN_ERR LOGIN_ERR
case "(H,Q,J)=\w"
send "jINETTEL"+cr
case "(H,Q,E,J)=\w"
send "2"+cr
case "telnet> "
send "open mix.or.jp"+cr
goto NEWUSER_MIX_LOGIN_START