home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
FWINDOWS
/
Padnv335
/
PADNV335.LZH
/
PADNAV.SCR
< prev
next >
Wrap
Text File
|
1996-10-26
|
118KB
|
4,895 lines
; NIFTY-Serve用通信統合環境 PADNAV 通信カーネル(秀Term用) Version 3.33
; Coded by Piyo / PFF01507
;
; setautohangup 5
writebuffer "PADNAV Communication Kernel Version 3.16^M^J"
;***************** 大域変数の初期設定 *******************
@delete = "YES" ; 電子メール取得後削除するか
@mrebpl = "YES" ; 本文一括読込をBPlusで行うか
@modem = "NO" ; "+++"による回線切断
@logsel = "NORMAL" ; ログをフォーラム単位で分ける
@hosoku = "NO" ; ライブラリ補足をダウンするか
@expert = "NO" ; エキスパートモードかどうか
@menu = "OFF" ; 端末設定フラグ
@frmmenu = "OFF" ; フォーラムオプション
@mailnew = "NO" ; 新しいメールのみ受信
@here = "UNKNOWN" ; NIFのポジションを記憶
@message = "NULL" ; 巡回中の会議室場所を記憶
@library = "NULL" ; 巡回中のライブラリ場所を記憶
@news = "FALSE" ; NIFからのお知らせを一括ダウンするか
@sdl = "FALSE" ; 送信簿をダウンするか
@login = "FALSE" ; ログイン処理のみ行うか
@logout = "FALSE" ; ログアウト処理をしないか
@gopad = "FALSE" ; PADファイルを処理するか
@logdir = "." ; ログディレクトリ
@ttlfile = "TTLPAD." ; 巡回PADファイル名
@padfile = "PAD.TMP" ; ダウンロードPADファイル名
@errlog = "ERROR.LOG" ; エラーログファイル名
@flag = "FALSE" ; サブルーチンのリターンコード
@get = "FALSE" ; フォーラム情報を入手するか
@id = "ID1" ; ID選択
@setup = "NO" ; セットアップ用フラグ
@getlist = "NO" ; 各種リスト取得巡回用フラグ
@allfrm = "NO" ; サービスメニューからフォーラム取得
@limit = "NO" ; 未読取得制限フラグ
@rc = "" ; 未読取得制限値
@inet = "NO" ; FENICS接続をスキップする
@skippad = "NO" ; PAD処理をスキップする
@article = "NO" ; 発言内容をすぐにダウンロードする
@extscr = "NO" ; 外部スクリプトを実行するか
@extfile = "" ; 外部スクリプトファイル名
@extsub = "" ; 外部スクリプトサブルーチン名
@@count = 0 ; リトライ回数
@readreq = "FALSE" ; 発言ダウンロード予約
@readsay = "" ; 発言ダウンロード用ログファイル名
@fuzai = "FALSE" ; 不在通知が登録されているか
@rtc = "NO" ; リアルタイム会議に参加するか
@nocheck = "NO" ; ログインチェックを行う
@libscan = "NO" ; ライブラリ検索日付の切替を行わない
@@rtc_no = 0 ; リアルタイム会議数
@frmttl = "" ; フォーラムタイトル
@comment = "YES" ; コメント機能(//)
@hpname[0] = "END" ; ホームパーティ変数初期化
@pationame[0] = "END" ; ホームパティオ変数初期化
@padname[0] = "END" ; 分割PADファイル変数初期化
@restart = "NO" ; 再巡回指定
@num[1] = "1"
@num[2] = "2"
@num[3] = "3"
@num[4] = "4"
@num[5] = "5"
@num[6] = "6"
@num[7] = "7"
@num[8] = "8"
@num[9] = "9"
@num[10] = "10"
@num[11] = "11"
@num[12] = "12"
@num[13] = "13"
@num[14] = "14"
@num[15] = "15"
@num[16] = "16"
@num[17] = "17"
@num[18] = "18"
@num[19] = "19"
@num[20] = "20"
@forum = ""
@lib = ""
@kind = ""
@dest = ""
@root = ""
@froot = ""
@flist = ""
@flib = ""
@@layer = 0
@floor[0] = ""
@tpcflag = ""
if( length(%fatr) == 0 ) %fatr = "0"
;************* TTLPAD, PADから情報読み込み **************
chdir script
openfile @ttlfile
if( yes )
readfile @ttlfile, #line
@logdir = #line
readfile @ttlfile, #line
@endpath = #line
beginloop
readfile @ttlfile, #line
if ( no ) breakloop
switch #line
case "*RESTART"
@restart = "YES"
case "*SETUP"
call Setup
case "*SDL"
@sdl = "TRUE"
case "*NEWS"
@news = "TRUE"
case "*LOGIN"
@login = "TRUE"
case "*LOGOUT"
@logout = "TRUE"
case "*HPLIST"
##i = 0;
readfile @ttlfile, #buf
if( yes )
while( #buf != "*END" )
@hpname[##i] = #buf
readfile @ttlfile, #buf
@hpid[##i] = #buf
readfile @ttlfile, #buf
@hppasswd[##i] = #buf
##i = ##i+1
readfile @ttlfile, #buf
if( no ) breakloop
endwhile
endif
@hpname[##i] = "END"
case "*PATIOLIST"
##i = 0;
readfile @ttlfile, #buf
if( yes )
while( #buf != "*END" )
@pationame[##i] = #buf
readfile @ttlfile, #buf
@patioid[##i] = #buf
readfile @ttlfile, #buf
@patiopasswd[##i] = #buf
##i = ##i+1
readfile @ttlfile, #buf
if( no ) breakloop
endwhile
endif
@pationame[##i] = "END"
case "*LIMIT"
@lmtflag = "TRUE"
case "*NEWMAIL"
@mailnew = "YES"
case "*ID1"
@id = "ID1"
case "*ID2"
@id = "ID2"
case "*EXPERT"
@expert = "YES"
case "*MAILSAVE"
@delete = "NO"
case "*MREAD"
@mrebpl = "NO"
case "*MODEM"
@modem = "YES"
case "*LOGDATE"
@logsel = "DATE"
case "*HOSOKU"
@hosoku = "YES"
case "*MYFORUM"
@getlist = "YES"
case "*BBSLIST"
@getlist = "YES"
case "*TOPICLIST"
@getlist = "YES"
case "*ALLFORUM"
@allfrm = "YES"
case "*SCRIPTSTART"
@extscr = "START"
case "*SCRIPTEND"
@extscr = "END"
case "*INTERNET"
@inet = "YES"
if( #line == "*SCRIPTSTART" ) @extscr = "TOP"
case "*SKIPPAD"
@skippad = "YES"
case "*MYARTICLE"
@article = "YES"
case "*RTC"
@rtc = "YES"
case "*IDCHECKOFF"
@nocheck = "YES"
case "*LIBSCAN"
@libscan = "YES"
case "*ENDCMD"
@endcmd = "YES"
case "*NOCOMMENT"
@comment = "NO"
case "*PADLIST"
##i = 0
readfile @ttlfile, #buf
if( yes )
while( #buf != "*END" )
@padname[##i] = #buf
@padflag[##i] = "FALSE"
##i = ##i+1
readfile @ttlfile, #buf
if( no ) breakloop
endwhile
endif
@padname[##i] = "END"
endswitch
endloop
closefile @ttlfile
restoredir
endif
if( @skippad != "YES" )
chdir script
copyfile "PAD.",@padfile
if( yes )
##i = value(%fatr)
##i = ##i + 1
if( ##i >= 10 ) ##i = 0
%fatr = @num[##i]
#atr = "00"+@num[##i]
delfile "PAD."+#atr
copyfile "PAD.", "PAD."+#atr
delfile "PAD."
endif
restoredir
endif
if( @setup != "DONE" )
chdir script
openfile @padfile
restoredir
if( yes ) @gopad = "TRUE"
endif
;************** NIFTY-Serveへの接続手順 *****************
afterhangup PostConnect
if( @restart == "YES")
title "再巡回開始"
goto Restart
endif
keyboard off
title "接続中"
if( @extscr == "TOP" )
call EXECUTE.SCR:EXECSUB
chdir script
delfile "EXECUTE.SCR"
restoredir
endif
if( @inet == "NO" )
timeout 4
beginloop
loopswitch
case " Enter Connection-ID --->"
timeout 20
goto nextseq
case "^M^J*"
send "C NIF^M" ; ホストとしてNIFを選択
loopswitch
case "^M^J Enter Connection-ID --->"
timeout 20
goto nextseq
case "^M^J*"
@@count = @@count + 1
if( @@count > 10 ) goto エラー
send "C NIF^M" ; 再コネクト要求
case timeout
breakloop
endloop
breakloop
case timeout
breakloop
endloop
timeout 1
send "."
wait "."
if( timeout )
send " P^M" ; Road 2, 3
else
send "00+" ; Road 1
endif
timeout 20
endloop
endif
nextseq:
send "SVC^M" ; 一般ユーザーとして接続
wait " Enter User-ID --->"
if( timeout ) goto エラー
if( @id == "ID1" ) #idset = %NifID
if( @id == "ID2" ) #idset = %NifID2
if( #idset == "" )
input "IDを入力して下さい", #idset
if( cancel ) goto HangUp
if( @id == "ID1" ) %NifID = #idset
if( @id == "ID2" ) %NifID2 = #idset
endif
EnterUserID:
send #idset + "^M"
loopswitch
case " Enter Password --->"
breakloop
case " User-ID Error"
timeoutmessage "ID番号が間違っています", 3
goto HangUp
case timeout
goto エラー
endloop
EnterPassword:
##count = 0
if( @id == "ID1" ) #passset = %%NifPassword
if( @id == "ID2" ) #passset = %%NifPass2
if( #passset == "" )
secretinput "パスワードを入力して下さい", #passset
if( cancel ) goto HangUp
if( @id == "ID1" ) %%NifPassword = #passset
if( @id == "ID2" ) %%NifPass2 = #passset
if( @id == "ID1" ) copyfile "variable.txt", %NifID+".VAR"
if( @id == "ID2" ) copyfile "variable.txt", %NifID2+".VAR"
if( @id == "ID1" ) copyfile "hideterm.ini", %NifID+".HTM"
if( @id == "ID2" ) copyfile "hideterm.ini", %NifID2+".HTM"
##count = ##count+1
endif
send #passset + "^M"
#mailread = "no"
CUG:
loopswitch
case "^M^JようこそNIFTY-Serveへ"
title "接続完了"
breakloop
case " Password ERROR"
timeoutmessage "パスワードが間違っています", 2
if( ##count > 2 ) goto HangUp
secretinput "パスワードを入力して下さい", #passset
if( cancel ) goto HangUp
if( @id == "ID1" ) %%NifPassword = #passset
if( @id == "ID2" ) %%NifPass2 = #passset
send #passset + "^M"
##count = ##count+1
case "^M^J本日は定期メンテナンス"
title "定期保守中"
goto Hoshu
case "^M^J只今の時間、"
title "定期保守中"
goto Hoshu
case "^M^J◆二重ログインです◆"
title "既にこのIDでログインされています"
goto LoginErr
case postmilliidle(500) "^M^J>"
send "GO NIF^M"
wait "3. 会員規約の表示^M^J>"
send "1^M"
goto CUG
case "-メールが"
title "CUG:メールが来ています"
#mailread = "yes"
case "未読分"
title "CUG:メールが来ています(未読メールあり)"
#mailread = "new"
case timeout
goto エラー
endloop
wait "^M^J All Rights Reserved^M^J" ; NIF接続を再確認
chdir log
delfile "opening.log"
restoredir
log "opening.log"
timeout 0
loopswitch
case "-メールが"
title "メールが来ています"
#mailread = "yes"
case "-現在,不在通知が"
title "不在通知が登録されています"
@fuzai = "TRUE"
case "未読分"
title "メールが来ています(未読メールあり)"
#mailread = "new"
case "☆フラッシュニュース☆"
title "フラッシュニュース"
log
log "flash."
case "今週のお知らせ"
title "今週のお知らせ"
log
chdir log
delfile "newsttl."
restoredir
log "newsttl."
#weeknews = "yes"
case "NIFTY-Serve TOP"
log
@MENU = "ON"
case "^M^J>"
log
##i = 2
beginloop
readbuffer ##i, #log1
#logdest = drop(#log1, "LOG")
if( #logdest == "前回" ) breakloop
##i = ##i+1
endloop
breakloop
endloop
if( @nocheck != "YES" )
if( @id == "ID1" )
#chkdate = "LOGOUT1.LOG"
else
#chkdate = "LOGOUT2.LOG"
endif
chdir log
openfile #chkdate
if( yes )
readfile #chkdate, #log2
closefile #chkdate
restoredir
#logdest = search(#log1, "OUT ")
##i = length(#logdest)
#logdest = part(#logdest, 4, ##i-4)
#logsrc = search(#log2, "- ")
##i = length(#logsrc)
#logsrc = part(#logsrc, 3, ##i-3)
endif
restoredir
if( #logsrc != #logdest )
call ChangePass
else
writebuffer2 "^M^Jログインチェック:侵入の形跡はありません^M^J>"
endif
endif
if( #weeknews == "yes" and @news == "TRUE" ) call ReadNews ; お知らせを読む
if( @menu == "ON" )
title "端末設定を変更しています"
call SetMenuOff
endif
if( #mailread == "new" ) call AutoMailRead ; 電子メール処理
if( #mailread == "yes" and @mailnew != "YES" ) call AutoMailRead
if( @login == "FALSE" or @getlist == "TRUE" )
if( @extscr == "START" )
call EXECUTE.SCR:EXECSUB
chdir script
delfile "EXECUTE.SCR"
restoredir
endif
Restart:
if( @skippad == "NO" ) call PAD ; ダウンロードPAD処理
call TITLE ; 巡回処理
if( @skippad == "NO" ) call RunPad ; 分割PAD処理
if( @sdl == "TRUE" ) call PADNAV1.SCR:SDL ; 送信簿処理
if( @restart == "YES" )
title "再巡回を終了しました"
exit ; 再巡回終了
endif
if( (@menu == "OFF") AND (@expert == "NO") )
title "端末設定を元に戻しています"
call SetMenuOn
endif
if( (@frmmenu = "OFF") AND (@expert == "NO") )
title "フォーラムオプションを元に戻しています"
call ForumMenuOn
endif
if( @rtc == "YES" ) call RTC ; リアルタイム会議
if( @extscr == "END" )
call EXECUTE.SCR:EXECSUB
chdir script
delfile "EXECUTE.SCR"
restoredir
endif
if( @logout == "FALSE" )
title "切断処理中"
send "OFF^M"
loopswitch
case "☆フラッシュニュース☆"
title "フラッシュニュース"
log "flash."
case "^M^J"
log
breakloop
endloop
else
title "巡回を終了しました"
keyboard on
getdate #date
log "NIF"+part( #date, 2, 4 )+".LOG"
endif
else
title "ログインを完了しました"
keyboard on
getdate #date
log "NIF"+part( #date, 2, 4 )+".LOG"
endif
loopswitch
case "^M^J ご利用誠にありがとうございました。^M^J"
breakloop
case "のユーザーからのメッセージです-^M^J"
readbuffer 1,#line
#line = drop(#line, " のユーザーからのメッセージです-")
#id = search(#line, "-")
#id = part(#id, 2, 8)
#file = @logdir+"\send.txt"
openfile #file
if( yes )
readfile #file, #line
send "SEND "+#id+" "+#line+"^M"
closefile #file
else
#line = ""
input "メッセージを入力して下さい", #line
if( enter ) send "SEND "+#id+" "+#line+"^M"
endif
endloop
log
switch
case "CLEAR CONFIRMED"
readbuffer 9, #buf
goto Logout1
case "*"
readbuffer 10, #buf
case "01+"
readbuffer 6, #buf
endswitch
Logout1:
chdir log
createfile #chkdate
writefile #chkdate, #buf
closefile #chkdate
restoredir
goto HangUp
;**************** エラー処理ルーチン ******************
エラー:
afterhangup ErrorHangup
goto HangUp
ErrorLog:
chdir log
appendfile @errlog
if( no ) createfile @errlog
gettime #time
#hour = part(#time, 0, 2)
#min = part(#time, 2, 2)
getdate #date
#year = part(#date, 0, 2)
#month = part(#date, 2, 2)
#day = part(#date, 4, 2)
#line = #year+"/"+#month+"/"+#day+" "+#hour+":"+#min+" "+#1
writefile @errlog, #line
closefile @errlog
restoredir
return
Hoshu:
message "定期保守中ですので、後程アクセスして下さい"
call ErrorLog "定期保守中"
goto HangUp
LoginErr:
message "既にこのIDでログインされています"
call ErrorLog "二重ログイン"
goto HangUp
ErrorHangup:
message "ネットワークに接続できませんでした"
call ErrorLog "ネットワーク接続失敗"
goto HangUp
ForumBusy:
message "フォーラムが混雑していて巡回出来ませんでした"
call ErrorLog "フォーラム混雑"
goto HangUp
HpBusy:
message "ネットワークが混雑していてホームパーティに入れませんでした"
call ErrorLog "ホームパーティ混雑"
goto HangUp
PatioBusy:
message "ネットワークが混雑していてホームパティオに入れませんでした"
call ErrorLog "ホームパティオ混雑"
goto HangUp
ForumHoshu:
message "フォーラム保守の為、巡回を中止しました"
call ErrorLog "フォーラム保守"
goto HangUp
;******************* 回線切断手順 *********************
HangUp:
if( @id == "ID1" ) copyfile "variable.txt", %NifID+".VAR"
if( @id == "ID2" ) copyfile "variable.txt", %NifID2+".VAR"
if( @modem == "YES" )
send "+++"
wait "OK"
send "ath^M"
wait "OK"
endif
hangup
PostConnect:
@ttlfile = "TTLPAD." ; 巡回PADファイル名
@logdir = "." ; ログディレクトリ
@endcmd = "NO" ; アクセス終了後に指定コマンドを実行するか
@endpath = "" ; アクセス終了後に実行されるコマンド
chdir script
openfile @ttlfile
if( yes )
readfile @ttlfile, #line
@logdir = #line
readfile @ttlfile, #line
@endpath = #line
beginloop
readfile @ttlfile, #line
if ( no ) breakloop
if( #line == "*ENDCMD" ) @endcmd = "YES"
endloop
closefile @ttlfile
restoredir
endif
if( @endcmd == "YES" )
run @endpath
else
openfile "setclkd.exe"
if( yes )
closefile "setclkd.exe"
##i = 0
#datetime = ""
while( #datetime == "" )
##i = ##i + 1
if( ##i > 30 ) breakloop
readbuffer ##i,#buf
#datetime = search( #buf," LOG OUT --- " )
endwhile
if(#datetime != "")
#datetime = part( #datetime, 23, 255 )
run "setclkd /ds:5 " + #datetime
endif
endif
endif
closehideterm
exit
;******************* 秀Termセットアップ *********************
Setup:
beginloop
readfile @ttlfile, #line
if ( no ) breakloop
##i = length(#line)
#p = part(#line, 1, 3)
if( #p == "ID1" )
#q = part(#line, 5, ##i-5)
%NifID = #q
readfile @ttlfile, #line
##i = length(#line)
#q = part(#line, 10, ##i-10)
%%NifPassword = #q
elseif( #p == "ID2" )
#q = part(#line, 5, ##i-5)
%NifID2 = #q
readfile @ttlfile, #line
##i = length(#line)
#q = part(#line, 10, ##i-10)
%%NifPass2 = #q
elseif( #p == "END" )
breakloop
endif
endloop
@setup = "DONE"
return
;<<<<<<<<<<<<<< PAD処理サブルーチン >>>>>>>>>>>>>>>>>
;*********** 「今週のお知らせ」読み取り手順 ************
ReadNews:
title "今週のお知らせ受信中"
log "NIFNEWS."
send "ALL^M"
loopswitch
case "^M^J続き (改行で次文書 E:終了)"
wait "^M^J>"
send "^M"
case "^M^J続き (改行で次頁 S:次文書 E:終了)"
wait "^M^J>"
send "^M"
case "^M^J続き (改行で表示 E:終了)"
wait "^M^J>"
send "^M"
case "^M^J表示終了"
wait "^M^J>"
log
breakloop
endloop
return
;************ 電子メールダウンロード手順 ***************
AutoMailRead:
#mailold = "NO"
#bmailflg = "FALSE"
title "電子メール受信中"
if( @here != "MAIL" )
send "MAIL^M"
loopswitch
case "^M^JMAIL>"
breakloop
case "^M^J>"
call SetMenuOff
send "MAIL^M"
endloop
@here = "MAIL"
endif
send "READ NEW^M" ; 始めに最新メールをダウン
log "MAIL." ; 記録開始
loopswitch
case "* 1" ; 既読メールあり
#mailold = "YES"
case postmilliidle(500) "^M^J:" ; メニューレスポンス
if( @delete == "YES" ) send "del^M"
else send "save^M" ; 読んだメールは保存
#mailold = "NO" ; フラグリセット
case postmilliidle(500) "^M^J>" ; 受信リストのレスポンス
if( @mailnew != "YES" )
send"1^M"
elseif( @mailnew == "YES" and #mailold == "NO" )
send"1^M"
else ; メニュープロンプトと判断
log
breakloop
endif
case postmilliidle(500) "^M^Jmore>", postmilliidle(500) "^M^J続き (改行で表示 E:終了)"
; ページ制御対応
send "^M"
case postmilliidle(100) "^M^Jaction:" ; コマンドレスポンス
if( @delete == "YES" ) send "del^M"
else send "save^M" ; 読んだメールは保存
#mailold = "NO"
case postmilliidle(500) "^M^JMAIL>" ; メール読み取り終了
if( @mailnew == "YES" )
log
breakloop
else ; 既読メール読み取り
send "READ^M"
endif
case "^M^J-未読メールは" ; メール読み取り終了
wait "^M^J>", "^M^JMAIL>"
if( @mailnew == "YES" )
log
breakloop
else ; 既読メール読み取り
send "READ^M"
endif
case "^M^J-あなた宛の" ; 既読メール読み取り終了
log
wait "^M^J>", "^M^JMAIL>"
breakloop
case "表示出来ません◆" ; バイナリーメールを確認
loopswitch
case postmilliidle(500) "^M^Jaction:" ; これも念のための処理
if( @delete == "YES" ) send "del^M"
else send "save^M"
case postmilliidle(500) "^M^JMAIL>", postmilliidle(500) "^M^J>"
; メール読み取り終了
log
send "READ NEW^M" ; バイナリーメールリスト取得
wait "^M^JMAIL>", "^M^J>"
##i = 0
beginloop
##i = ##i+1
readbuffer ##i, #line
#p = part(#line, 0, 6)
if( #p == "◆番号" )
#bmail[##i] = part(#line, 6, 2)
else
breakloop
endif
endloop
while( ##i > 1 )
call DownBMAIL #bmail[##i-1]
##i = ##i-1
endwhile
breakloop
endloop
if( @mailnew == "YES" )
log
breakloop
else ; 既読メール読み取り
send "READ^M"
endif
endloop
return
;************** バイナリーメール読み取り手順 ***************
DownBMAIL:
title "バイナリーメール受信中"
chdir download
send "DOWN "+#1+" PROT:BPL^M"
loopswitch
case ":"
gettime #time ; ダウン時の時間をファイル名に
#hour = part(#time, 0, 2)
#min = part(#time, 2, 2)
#file=#time+".lzh"
getdate #date
#year = part(#date, 0, 2)
#month = part(#date, 2, 2)
#day = part(#date, 4, 2)
#title = "^M^J^M^J 0 【B-Mail受信】 ???????? "+#year+"/"+#month+"/"+#day+" "+#hour+":"+#min+" "+#file
#log = @logdir+"\mail."
appendfile #log
if( no ) createfile #log
writefile #log, #title
closefile #log
port autobplus = off
send #file+"^M" ; 普通は、LHaで圧縮されているはず
wait "^E"
download #file, bplus
wait "^M^J:"
if( @delete == "YES" )
send "1^M"
else
send "2^M"
endif
case "^M^JMAIL>", "^M^J>" ; ダウンロード終了
port autobplus = on
restoredir
breakloop
endloop
return
;************** ダウンロードPAD処理手順 ****************
PAD:
if( @gopad != "TRUE" ) return ; PADファイルがない
beginloop
readfile @padfile, #line
if( no ) breakloop ; PAD処理終了
#buf = "FALSE"
#p = part( #line, 0, 1 )
if( #p == "*" ) ; PAD命令か?
if( #line == "*MAIL" )
if( @readreq == "TRUE" ) call DownMyArticle ; 発言記事をダウン
call SendMail
goto skip_pad
endif
if( #line == "*BMAIL" )
if( @readreq == "TRUE" ) call DownMyArticle
call SendBMail
goto skip_pad
endif
if( #line == "*DELMAIL" )
if( @readreq == "TRUE" ) call DownMyArticle
call DelMail
goto skip_pad
endif
if( #line == "*NEWFORUM" )
if( @readreq == "TRUE" ) call DownMyArticle
call Regist #line
goto skip_pad
endif
if( #line == "*NEWSUBFRM" )
if( @readreq == "TRUE" ) call DownMyArticle
call Regist #line
goto skip_pad
endif
if( #line == "*SHAREWARE" )
if( @readreq == "TRUE" ) call DownMyArticle
call Share
goto skip_pad
endif
if( #line == "*SETPROF" )
if( @readreq == "TRUE" ) call DownMyArticle
call SetProf
goto skip_pad
endif
if( #line == "*SETFUZAI" )
if( @readreq == "TRUE" ) call DownMyArticle
call SetFuzai
goto skip_pad
endif
if( #line == "*RESETFUZAI" )
if( @readreq == "TRUE" ) call DownMyArticle
call ResetFuzai
goto skip_pad
endif
if( #line == "*DISCLOSE" )
if( @readreq == "TRUE" ) call DownMyArticle
call PADNAV1.SCR:ChgPrivate #line
goto skip_pad
endif
if( #line == "*SECRET" )
if( @readreq == "TRUE" ) call DownMyArticle
call PADNAV1.SCR:ChgPrivate #line
goto skip_pad
endif
if( #line == "*ACCESSGIFT" )
if( @readreq == "TRUE" ) call DownMyArticle
call PADNAV1.SCR:AccessGift @padfile
@flag = "FALSE"
goto skip_pad
endif
if( #line == "*RECEIVEGIFT" )
if( @readreq == "TRUE" ) call DownMyArticle
call PADNAV1.SCR:ReceiveGift
@flag = "FALSE"
goto skip_pad
endif
if( #line == "*FILEFINDER" )
if( @readreq == "TRUE" ) call DownMyArticle
call PADNAV1.SCR:FileFinder @padfile, @logdir
@flag = "FALSE"
goto skip_pad
endif
if( #line == "*CHGPASS" )
if( @readreq == "TRUE" ) call DownMyArticle
call ChgPass
goto skip_pad
endif
if( #line == "*SYSOP" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
call ToSysop #line, #buf
goto skip_pad
endif
if( #line == "*DELTITLE" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
#forum = "*GO "+#line
#topic = @logdir+"\topic.lst"
openfile #topic
readfile #topic, #list
while( yes )
if( #list == #line )
closefile #topic
call DelTitle #forum, #buf, "TOPIC"
goto skip_pad
endif
readfile #topic, #list
endwhile
closefile #topic
#IsPatio = "FALSE"
##i = 0
beginloop
if( @pationame[##i] == #line )
#IsPatio = "TRUE"
breakloop
elseif( @pationame[##i] == "END" )
breakloop
endif
##i = ##i+1
endloop
if( #IsPatio == "TRUE" )
call DelTitle #forum, #buf, "PATIO", @patioid[##i], @patiopasswd[##i]
else
call DelTitle #forum, #buf, "FORUM"
endif
goto skip_pad
endif
if( #line == "*QUIT" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
call FrmQuit #line, #buf
goto skip_pad
endif
if( #line == "*CHGHANDLE" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
call ChgHandle #line, #buf
goto skip_pad
endif
if( #line == "*READNEWS" )
if( @readreq == "TRUE" ) call DownMyArticle
@here = "NEW"
readfile @padfile, #line
call PADNAV1.SCR:ReadWeekNews #line
goto skip_pad
endif
if( #line == "*TOPICLIST" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #line
call PADNAV1.SCR:GetTopicList #line, @logdir
goto skip_pad
endif
if( #line == "*TOPIC" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #line1
; if( @here == #line1) #buf = "TRUE"
@here = #line1
call GetTopic #line1, "PAD", #buf ; 特設掲示板の読取
goto skip_pad
endif
if( #line == "*TELNET" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #address
readfile @padfile, #scr
call PADNAV1.SCR:Telnet #address, #scr
goto skip_pad
endif
if( #line == "*CHECKSHARE" )
if( @readreq == "TRUE" ) call DownMyArticle
readfile @padfile, #number
readfile @padfile, #from
readfile @padfile, #to
call PADNAV1.SCR:CheckShare #number, #from, #to
goto skip_pad
endif
#p = part( #line, 1, 2 )
if( #p == "HP" )
if( @readreq == "TRUE" ) call DownMyArticle
##i = length(#line)
#p = part(#line, 4, ##i-4)
if( @here == #p) #buf = "TRUE"
@here = #p
call SendHP #p, #buf ; 書き込み処理(HP)
goto skip_pad
elseif( #p == "PA" )
##i = length(#line)
#p = part(#line, 7, ##i-7)
if( @here == #p)
#buf = "TRUE"
elseif( @readreq == "TRUE" )
call DownMyArticle
endif
@here = #p
call SendPatio #p, #buf ; 書き込み処理(Patio)
@readreq = "TRUE"
goto skip_pad
elseif( #p == "GO" ) ; 本文読みだし
if( @readreq == "TRUE" ) call DownMyArticle
##i = length(#line)
#q = part( #line, 4, ##i-4 )
if( @here == #q) #buf = "TRUE"
@here = #q
#topic = @logdir+"\topic.lst"
openfile #topic
readfile #topic, #list
while( yes )
if( #list == #q )
closefile #topic
call Forum #line, #buf, "TOPIC"
goto skip_pad
endif
readfile #topic, #list
endwhile
closefile #topic
#IsPatio = "FALSE"
##i = 0
beginloop
if( @pationame[##i] == #q )
#IsPatio = "TRUE"
breakloop
elseif( @pationame[##i] == "END" )
breakloop
endif
##i = ##i+1
endloop
if( #IsPatio == "FALSE" )
call Forum #line, #buf, "FORUM"
else
call DownPatio #line, #buf
endif
goto skip_pad
elseif( #p == "PR" )
if( @readreq == "TRUE" ) call DownMyArticle
call PADNAV1.SCR:Profile #line ; プロフィール読みだし
goto skip_pad
elseif( #p == "BU" )
#p = part( #line, 1, 8 )
if( #p == "BULTITLE" )
if( @readreq == "TRUE" ) call DownMyArticle
##i = length(#line)
#q = part( #line, 10, ##i-10 )
call GetBbsTitle #q ; 掲示板リストの呼び出し
goto skip_pad
endif
endif ; 書き込み処理(フォーラム)
##i = length(#line)
#p = part(#line, 1, ##i-1)
if( @here == #p) #buf = "TRUE"
@here = #p
#p = part(#line, 1, ##i-1)
#cmd = "*GO "+#p
#topic = @logdir+"\topic.lst"
openfile #topic
readfile #topic, #list
while( yes )
if( #list == #p )
closefile #topic
call SendMes #cmd, #buf, "TOPIC"
goto skip_pad
endif
readfile #topic, #list
endwhile
closefile #topic
call SendMes #cmd, #buf, "FORUM"
endif
skip_pad:
endloop
if( @readreq == "TRUE" ) call DownMyArticle
closefile @padfile
chdir script
delfile @padfile
restoredir
@gopad = "FALSE"
return
;************** フォーラムから情報を読み込む ****************
Forum:
#tpc = "FALSE"
#inet = "FALSE"
##i = length(#1)
#forum = part(#1, 4, ##i-4)
if( #forum == "bbs" )
title "掲示板から受信中"
#3 = "BBS"
else
title #forum+"から受信中"
endif
if( #2 == "FALSE" )
@get = "FALSE"
if( #3 == "FORUM" )
call AccessForum #1 ; フォーラムを移動する
else
call AccessTopic #1
endif
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endif
readfile @padfile, #line
#IsBul = #line
##i = length(#line)
#kind = part(#line , 1, 3)
#root = part(#line, 5, ##i-5)
#destnum = part(#line, 9, ##i-9)
@froot = @logdir+"\"+#forum+"\"
kind_next:
switch #kind
case "TPC" ; サブ目次へ移動
#tpc = "TRUE"
#dest = drop(#root, ",")
#root = search(#root, ",")
##i = length(#root)
if( ##i != 0 ) #root = part(#root, 1, ##i-1)
if( length(#dest) == 0 )
#dest = #root
##i = 0
endif
if( length(#dest) == 1 )
@froot = @froot+"SUB0"+#dest+"\"
else
@froot = @froot+"SUB"+#dest+"\"
endif
send #dest+"^M"
loopswitch
case "^M^J>"
if( ##i == 0 ) breakloop
#dest = drop(#root, ",")
#root = search(#root, ",")
##i = length(#root)
if( ##i != 0 ) #root = part(#root, 1, ##i-1)
if( length(#dest) == 0 )
#dest = #root
##i = 0
endif
if( length(#dest) == 1 )
@froot = @froot+"SUB0"+#dest+"\"
else
@froot = @froot+"SUB"+#dest+"\"
endif
@floor[@@layer] = #dest
@@layer = @@layer+1
send #dest+"^M"
case "^M^Jmore>"
send "E^M"
case "^M^JFORUM>"
breakloop
case "^M^JBBS>"
goto get_bbs
case "NetNews"
#inet = "TRUE"
endloop
readfile @padfile, #line
##i = length(#line)
#kind = part(#line , 1, 3)
#root = part(#line, 5, ##i-5)
goto kind_next
case "NWS" ; ニュース取得
send #root+"^M"
loopswitch
case "^M^Jmore>"
breakloop
case "^M^J>"
breakloop
case "^M^JFORUM>"
breakloop
case "^M^JBBS>"
goto get_bbs
endloop
if( @logsel == "NORMAL" )
if( length(#root) == 1 )
#file = @froot+#forum+".M0"+#root ; ログを開く
else
#file = @froot+#forum+".M"+#root ; ログを開く
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line , 2, ##i-2)
send #p+"^M"
log #file
loopswitch
case "^M^J>"
log
breakloop
case "^M^Jnext>"
send "^M"
endloop
send "T^M"
loopswitch
case "^M^J>"
return
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
endloop
case "MES" ; 本文読み込みか?
if( @logsel == "NORMAL" )
if( length(#root) == 1)
#file = @froot+#forum+".M0"+#root
else
#file = @froot+#forum+".M"+#root
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
call MoveMes #line, #2, "CCS", #file, #inet ; 会議室移動
if( @flag == "TRUE" ) return ; 会議室が存在しない
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
#r = part(#line, 1, 4)
if( #IsBul == "*MES 21" )
#s = part(#line, 2, ##i-2)
#p = "READ "+#s
#r = "READ"
endif
send #p+"^M" ; 本文を指定
if( #r == "DOWN" )
wait "^M^J:"
send "1^M"
wait "開始-"
endif
log #file
loopswitch
case postmilliidle(500) "^M^JCCS(N)>", postmilliidle(500) "^M^JCCS(P)>", postmilliidle(500) "^M^JBBS>", postmilliidle(500) "^M^J>"
log ; 本文読み込み終了
breakloop
case "^M^J◆番号"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JBBS>"
if( #r == "DOWN" )
#line = part(#line, 6, ##i-6-length(search(#line, " PROT")))
##i = length(#line)
else
#line = part(#line, 1, ##i-1)
##i = ##i - 1
endif
beginloop
##len = length(search(#line, ","))
#s = part(#line, 0, ##i-##len)
if( part(#s, 0, 1) == "#" )
send #s+"^M"
elseif( #r == "READ" )
send "READ "+#s+"^M"
else
send "#"+#s+"^M"
endif
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JBBS>"
#line = search(#line, ",")
##i = length(#line)
#line = part(#line, 1, ##i-1)
##i = ##i - 1
if( ##i <= 0 ) breakloop
endloop
breakloop
case postmilliidle(500) "^M^Jnext>"
send "^M"
endloop
if( #IsBul != "*MES 21" )
send "RC D^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JBBS>"
endif
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
endif
case "BUL"
if( @logsel == "NORMAL" )
if( length(#root) == 1 )
#file = @froot+#forum+".M0"+#root
else
#file = @froot+#forum+".M"+#root
endif
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
if( length(#root) == 1)
#list = @froot+#forum+".R0"+#root
else
#list = @froot+#forum+".R"+#root
endif
send #root+"^M"
loopswitch
case "^M^JBBS>"
breakloop
case "◆"
wait "^M^J>"
send "TT^M"
case "^M^J>"
timeoutmessage "掲示板へのアクセスに失敗しました", 3
call ErrorLog "掲示板へのアクセス失敗("+#forum+":BUL)"
return
endloop
call ReadBBSArticle #file, #list, "NORMAL", "TRUE"
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
endif
return
case "TPB"
if( @logsel == "NORMAL" )
if( length(#root) == 1 )
#file = @froot+#forum+".M0"+#root
else
#file = @froot+#forum+".M"+#root
endif
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
if( length(#root) == 1)
#list = @froot+#forum+".R0"+#root
else
#list = @froot+#forum+".R"+#root
endif
send #root+"^M"
loopswitch
case "^M^JBBS>"
breakloop
case "◆"
wait "^M^J>"
send "TT^M"
case "^M^J>"
timeoutmessage "掲示板へのアクセスに失敗しました", 3
call ErrorLog "掲示板へのアクセス失敗("+#forum+":TPB)"
return
endloop
call ReadBBSArticle #file, #list, "NORMAL", "TRUE"
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
endif
return
case "LIB" ; ライブラリのダウンか?
if( @readreq == "TRUE" ) call DownMyArticle
#p = part(#line, 1, ##i-1)
if( #p != @library ) ; ライブラリ移動あり
send #p+"^M"
wait "^M^JLIB>"
@library = #p
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
switch #p
case "HOSOKU"
send "DOWN PROT:BPL^M"
wait "^M^J:"
readfile @padfile, #line
readfile @padfile, #file
send #line+"^M" ; ファイル番号を指定
wait "^M^J:"
send "1^M"
##i = length(#file)
#fhosoku = part( #file, 0, ##i-3 )
#fhosoku = @logdir+"\hosoku\"+#fhosoku+"ホソク"
createfile #fhosoku
writefile #fhosoku, #forum
writefile #fhosoku, @library
closefile #fhosoku
log #fhosoku
loopswitch
case "^M^J:"
log
send "E^M"
breakloop
case "^M^J-該当するデータはありません-"
call ErrorLog "該当データ無し("+#forum+":HOSOKU) "+#file
log
breakloop
endloop
wait "^M^JLIB>"
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
@library = "NULL"
endif
case "DOWN PROT:BPL"
send #p+"^M" ; ダウンロード方法を指定
wait "^M^J:"
readfile @padfile, #line
readfile @padfile, #file
send #line+"^M" ; ファイル番号を指定
wait "^M^J:"
send "1^M"
if( @hosoku == "YES" )
##i = length(#file)
#fhosoku = part( #file, 0, ##i-3 )
#fhosoku = @logdir+"\download\"+#fhosoku+"ホソク"
createfile #fhosoku
writefile #fhosoku, #forum
writefile #fhosoku, @library
closefile #fhosoku
log #fhosoku
endif
loopswitch
case "^M^J:"
if( @hosoku == "YES" ) log
send "1^M"
wait "^M^J:"
port autobplus = off
send #file+"^M" ; ファイル名を指定
wait "^E"
download #file, bplus
breakloop
case "^M^J-該当するデータはありません-"
if( @hosoku == "YES" ) log
call ErrorLog "該当データ無し("+#forum+":LIB) "+#file
breakloop
endloop
wait "^M^JLIB>" ; ダウンロード終了
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
@library = "NULL"
endif
port autobplus = on
case default
readfile @padfile, #file
send #p+"^M" ; ダウンロード方法を指定
loopswitch
case "^M^J>"
breakloop
case "^M^J-該当するデータはありません-"
wait "^M^JLIB>" ; ダウンロード終了
call ErrorLog "該当データ無し("+#forum+":Def) "+#file
return
case "^M^J◆番号"
wait "^M^JLIB>" ; ダウンロード終了
call ErrorLog "ダウンロード指定異常("+#forum+":Def) "+#p
return
endloop
readbuffer 1,#line
#q = part( #line, 0, 4)
send #q+"^M" ; ファイル番号を指定
if( @hosoku == "YES" )
##i = length(#file)
#fhosoku = part( #file, 0, ##i-3 )
#fhosoku = @logdir+"\"+#fhosoku+"ホソク"
createfile #fhosoku
writefile #fhosoku, #forum
writefile #fhosoku, @library
closefile #fhosoku
log #fhosoku
endif
loopswitch
case "^M^J:"
if( @hosoku == "YES" ) log
send "1^M"
wait "^M^J:"
port autobplus = off
send #file+"^M" ; ファイル名を指定
wait "^E"
download #file, bplus
breakloop
case "^M^J-該当するデータはありません-"
if( @hosoku == "YES" ) log
call ErrorLog "該当データ無し("+#forum+":Def) "+#file
breakloop
endloop
wait "^M^JLIB>" ; ダウンロード終了
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
@library = "NULL"
endif
port autobplus = on
endswitch
case "BPL"
if( @logsel == "NORMAL" )
if( length(#root) == 1)
#file = @froot+#forum+".M0"+#root
else
#file = @froot+#forum+".M"+#root
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
call MoveMes #line, #2, "CCS", #file, #inet ; 会議室移動
if( @flag == "TRUE" ) return ; 会議室が存在しない
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
##count = 0
BPLEnt:
send #p+"^M" ; ダウンロード指定
wait "^M^J:"
port autobplus = off
send #file+"^M" ; ファイル名指定
wait "^E"
download #file, bplus, append
loopswitch
case "+0B1"
##count = ##count+1
if(##count > 10)
timeoutmessage "BPlusによるファイル転送ができません", 3
call ErrorLog "BPlus転送失敗("+#forum+":BPL) "+#file
breakloop
endif
sendbreak
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JBBS>"
goto BPLEnt
case "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JBBS>"
breakloop
endloop
port autobplus = on
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
endif
return
case "BPB"
if( @logsel == "NORMAL" )
if( length(#root) == 1 )
#file = @froot+#forum+".M0"+#root
else
#file = @froot+#forum+".M"+#root
endif
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
if( length(#root) == 1)
#list = @froot+#forum+".R0"+#root
else
#list = @froot+#forum+".R"+#root
endif
send #root+"^M"
loopswitch
case "^M^JBBS>"
breakloop
case "◆"
wait "^M^J>"
send "TT^M"
case "^M^J>"
timeoutmessage "掲示板へのアクセスに失敗しました", 3
call ErrorLog "掲示板へのアクセス失敗("+#forum+":BPB)"
return
endloop
call ReadBBSArticle #file, #list, "BPLUS", "FALSE"
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
endif
return
case "BPT"
if( @logsel == "NORMAL" )
if( length(#root) == 1 )
#file = @froot+#forum+".M0"+#root
else
#file = @froot+#forum+".M"+#root
endif
endif
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
if( length(#root) == 1)
#list = @froot+#forum+".R0"+#root
else
#list = @froot+#forum+".R"+#root
endif
send #root+"^M"
loopswitch
case "^M^JBBS>"
breakloop
case "◆"
wait "^M^J>"
send "TT^M"
case "^M^J>"
timeoutmessage "掲示板へのアクセスに失敗しました", 3
call ErrorLog "掲示板へのアクセス失敗("+#forum+":BPT)"
return
endloop
call ReadBBSArticle #file, #list, "BPLUS", "TRUE"
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
case "^M^J>"
breakloop
case "^M^JFORUM>"
send "T^M"
case "^M^JBBS>"
send "T^M"
endloop
endif
return
case "MOV" ; 未読位置の変更
#line = "*MES "+#root
call MoveMes #line, #2, "CCS", "NULL", #inet ; 会議室移動
if( @flag == "TRUE" ) return ; 会議室が存在しない
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
send #p+"^M"
loopswitch
case "^M^J>"
breakloop
case "^M^JCCS(N)>"
breakloop
case "^M^JCCS(P)>"
breakloop
case "^M^JPATIO(N)>"
breakloop
case "^M^JPATIO(P)>"
breakloop
case "^M^JBBS>"
breakloop
endloop
return
case "ANN" ; お知らせ一覧の取得
log @logdir+"\"+#forum+".ann"
send "ann^M"
loopswitch
case "^M^J>"
breakloop
case "next>"
send "^M"
case "^M^JFORUM>"
breakloop
endloop
log
return
case "REA" ; お知らせ一覧の取得
send "ann^M"
wait "^M^J>"
send #destnum+"^M"
log @froot+#forum+".ann"
loopswitch
case "^M^J>"
breakloop
case "next>"
send "^M"
case "^M^JFORUM>"
breakloop
endloop
log
return
endswitch
return
;*********** ホームパティオから情報を読み込む *************
Patio:
title #1+"から受信中"
readfile @ttlfile, #id ; パティオ情報を読み込む
readfile @ttlfile, #password
if( #2 == "FALSE" )
call AccessPatio #id, #password, #1
if (@flag == "TRUE" ) return
endif
#buf = #1+".FRM"
chdir log
openfile #buf
if ( no )
closefile #buf
restoredir
timeoutmessage "ログをオープン出来ませんでした", 3
call ErrorLog "ログオープン失敗("+#1+")"
endif
#flag = "FALSE"
#mes = "NO"
beginloop
readfile #buf, #list
if( #list == ">" )
closefile #buf
restoredir
breakloop
endif
if( #flag == "TRUE" )
if( part(#list, 12, 4) == " 0" )
#mes = "NO"
else
#mes = "YES"
endif
endif
if( #list == "番号 発言 (未読) 最新 会議室名" ) #flag = "TRUE"
endloop
if( #3 == "*DOWNTITLE" )
if( #mes == "YES" )
send "RTN^M"
loopswitch
case "題名"
log @logdir+"\PATIO\"+#1+".R01"
wait "^M^J>"
log
send "^M"
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
send "RC MAX^M"
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
breakloop
case "ありません◆"
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
breakloop
endloop
log
endif
else
if( #mes == "YES" )
if( @mrebpl == "NO" )
title #1+"から本文受信中(MREad)"
if( @logsel == "NORMAL" )
#dest = @logdir+"\PATIO\"+#1+".M01" ; ログを開く
else
getdate #date
#dest = "NIF"+part( #date, 2, 4 )+".LOG"
endif
send "MRE ROOM:1 MODE:NEW^M"
log #dest
wait postmilliidle(500) "^M^JPATIO(N)>", postmilliidle(500) "^M^JPATIO(P)>"
log
else
title #1+"から本文受信中(BPlus)"
if( @logsel == "NORMAL" )
#dest = @logdir+"\PATIO\"+#1+".M01" ; ログを開く
else
getdate #date
#dest = "NIF"+part( #date, 2, 4 )+".LOG"
endif
##count = 0
PatioEnt:
port autobplus = off
send "DOWN NEW PROT:BPL^M" ; ダウンロード指定
loopswitch
case "^M^J:"
send #dest+"^M" ; ファイル名指定
wait "^E"
download #dest, bplus, append
loopswitch
case "+0B1"
##count = ##count+1
if(##count > 10)
timeoutmessage "BPlusによるファイル転送ができません", 3
call ErrorLog "BPlus転送失敗("+#1+")"
breakloop
endif
sendbreak
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
goto PatioEnt
case "^M^JPATIO(N)>", "^M^JPATIO(P)>"
breakloop
endloop
port autobplus = on
breakloop
case "^M^J◆現在、未読の"
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
breakloop
endloop
endif
endif
endif
return
;********* ホームパティオから情報をダウンロード **********
DownPatio:
##i = length(#1)
#fname = part(#1, 4, ##i-4)
title #fname+"から受信中"
##i = 0
beginloop
if( @pationame[##i] == #fname )
#id = @patioid[##i]
#password = @patiopasswd[##i]
breakloop
elseif( @pationame[##i] == "END" )
timeoutmessage "ホームパティオ情報に誤りがあります", 3
call ErrorLog "ホームパティオ情報異常("+#fname+")"
readfile @padfile, #line
readfile @padfile, #line
return
endif
##i = ##i + 1
endloop
if( #2 == "FALSE" )
call AccessPatio #id, #password, #fname
if (@flag == "TRUE" ) return
endif
readfile @padfile, #line
#kind = part(#line, 1, 3)
switch #kind
case "MES"
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
send #p+"^M" ; 本文を指定
if( @logsel == "NORMAL" )
log @logdir+"\PATIO\"+#fname+".M01" ; ログを開く
else
getdate #date
log "NIF"+part( #date, 2, 4 )+".LOG"
endif
loopswitch
case postmilliidle(500) "^M^J:"
send "1^M"
case postmilliidle(500) "^M^JPATIO(N)>", postmilliidle(500) "^M^JPATIO(P)>"
log ; 本文読み込み終了
send "RC D^M"
breakloop
case postmilliidle(500) "^M^Jnext>"
send "^M"
endloop
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
case "BPL"
if( @logsel == "NORMAL" )
#file = @logdir+"\PATIO\"+#fname+".M01"
else
getdate #date
#file = "NIF"+part( #date, 2, 4 )+".LOG"
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
##count = 0
DPatioEnt:
send #p+"^M" ; ダウンロード指定
wait "^M^J:"
port autobplus = off
send #file+"^M" ; ファイル名指定
wait "^E"
download #file, bplus, append
loopswitch
case "+0B1"
##count = ##count+1
if(##count > 10)
timeoutmessage "BPlusによるファイル転送ができません", 3
call ErrorLog "BPlus転送失敗("+#fname+")"
breakloop
endif
sendbreak
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
goto DPatioEnt
case "^M^JPATIO(N)>", "^M^JPATIO(P)>"
breakloop
endloop
port autobplus = on
endswitch
return
;*********** ホームパーティから情報を読み込む *************
Hp:
title #1+"から受信中"
readfile @ttlfile, #id ; HP情報を読み込む
readfile @ttlfile, #password
if( #2 == "FALSE" )
call AccessHP #id, #password
if (@flag == "TRUE" ) return
endif
if( @logsel == "NORMAL" )
log @logdir+"\HP\"+#1
else
getdate #date
log "NIF"+part( #date, 2, 4 )+".LOG"
endif
send "READ NEW^M"
wait postmilliidle(500) "^M^JHP>"
log
return
;************** 掲示板から情報を読み込む ****************
ReadBBSArticle:
if( #4 == "TRUE" )
##br = 35
else
##br = 30
endif
openfile #2
while(#buf1 != "番号")
readfile #2, #buf
if( no ) breakloop
#buf1 = part(#buf, 0, 4)
endwhile
readfile #2, #buf
##len = length(#buf)
if( ##len > ##br )
#scan = part(#buf, ##br, ##len-##br)
else
closefile #2
timeoutmessage "掲示板リストが見つかりません", 3
call ErrorLog "掲示板リストが見つからない("+#2+")"
send "E^M"
loopswitch
case "^M^JBBS>"
send "E^M"
case "^M^J>"
return
endloop
return
endif
closefile #2
send "READ^M"
loopswitch
case #scan
sendbreak
case "^M^J>"
send "E^M"
case "^M^JBBS>"
breakloop
endloop
##i = 2
while(#buf != #scan)
if(( ##i > 500 ) or (#buf == "題名"))
timeoutmessage "掲示板リストの先頭が見つかりません", 3
call ErrorLog "掲示板リストが古すぎる"
send "E^M"
loopswitch
case "^M^JBBS>"
send "E^M"
case "^M^J>"
return
endloop
return
endif
readbuffer ##i, #buf1
##len = length(#buf1)
if( ##len > ##br )
#buf = part(#buf1, ##br, ##len-##br)
else
#buf = ""
endif
##i = ##i+1
endwhile
readbuffer ##i-1, #buf
#scan = part(#buf, 0, 3)
##val = value(#scan)-1
readfile @padfile, #line
##i = length(#line)
if( #3 == "BPLUS" )
#line = part(#line, 6, ##i-15)
##i = ##i - 15
#p = "DOWN "
else
#line = part(#line, 1, ##i-1)
##i = ##i - 1
#p = "READ "
endif
##tmp = 0
beginloop
##len = length(search(#line, ","))
#s = part(#line, 0, ##i-##len)
openfile #2
#t = "0"
while(value(#s)+##val != value(#t))
readfile #2, #buf
if( no )
timeoutmessage "掲示板リスト検索に失敗しました", 3
call ErrorLog "掲示板リスト検索失敗"
send "E^M"
loopswitch
case "^M^JBBS>"
send "E^M"
case "^M^J>"
return
endloop
return
endif
#t = part(#buf, 0, 3)
endwhile
closefile #2
#s = part(#buf, 0, 3)
while(part(#s, 0, 1) == " ")
##len = length(#s)
#s = part(#s, 1, ##len-1)
endwhile
if( ##tmp == 0 )
#p = #p + #s
##tmp = 1
else
#p = #p+","+#s
endif
#line = search(#line, ",")
##i = length(#line)
#line = part(#line, 1, ##i-1)
##i = ##i - 1
if( ##i <= 0 ) breakloop
endloop
if( #3 == "BPLUS" )
#p = #p+" PROT:BPLUS"
##count = 0
RBBSEnt:
send #p+"^M" ; 本文を指定
wait "^M^J:"
port autobplus = off
send #1+"^M" ; ファイル名指定
wait "^E"
download #1, bplus, append
loopswitch
case "+0B1"
##count = ##count+1
if(##count > 10)
timeoutmessage "BPlusによるファイル転送ができません", 3
call ErrorLog "BPlus転送失敗(掲示板)"
breakloop
endif
sendbreak
wait "^M^JBBS>", "^M^J>"
goto RBBSEnt
case "^M^JBBS>", "^M^J>"
breakloop
endloop
port autobplus = on
else
send #p+"^M" ; 本文を指定
log #1
loopswitch
case postmilliidle(500) "^M^JBBS>"
log ; 本文読み込み終了
breakloop
case postmilliidle(500) "^M^J>"
send "^M"
case "^M^J◆番号"
wait "^M^JBBS>"
timeoutmessage "指定したリストの内容がありません", 3
call ErrorLog "掲示板リスト指定ミス "+#p
breakloop
case postmilliidle(500) "^M^Jnext>"
send "^M"
case "^M^J現在、サービスは大変混雑しています"
wait "^M^JBBS>", "^M^J>"
call ErrorLog "掲示板混雑により巡回拒否 "+#p
breakloop
endloop
endif
send "E^M"
wait "^M^J>"
return
;***** BPlusを使ってフォーラムから未読文章をすべて読み込む ******
AllBPlus:
title #1+"から本文受信中(BPlus)"
if( @logsel == "NORMAL" )
#dest = @logdir+"\"+#1+"\"+#1
#dest = #dest+".M"+#2 ; ログを開く
else
getdate #date
#dest = "NIF"+part( #date, 2, 4 )+".LOG"
endif
port autobplus = off
##count = 0
ABBSEnt:
send "DOWN NEW PROT:BPL^M" ; ダウンロード指定
loopswitch
case "^M^J:"
send #dest+"^M" ; ファイル名指定
wait "^E"
download #dest, bplus, append
loopswitch
case "+0B1"
##count = ##count+1
if(##count > 10)
timeoutmessage "BPlusによるファイル転送ができません", 3
call ErrorLog "BPlus転送失敗("+#1+":AllBPlus)"
breakloop
endif
sendbreak
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
goto ABBSEnt
case "^M^JCCS(N)>", "^M^JCCS(P)>"
breakloop
endloop
port autobplus = on
breakloop
case "^M^J◆現在、未読の"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
breakloop
endloop
return
;***** MREadを使ってフォーラムから未読文章をすべて読み込む ******
AllMread:
title #1+"から本文受信中(MREad)"
if( @logsel == "NORMAL" )
#dest = @logdir+"\"+#1+"\"+#1
#dest = #dest+".M"+#2 ; ログを開く
else
getdate #date
#dest = "NIF"+part( #date, 2, 4 )+".LOG"
endif
send "MRE ROOM:"+#2+" MODE:NEW^M" ; ダウンロード指定
log #dest
wait postmilliidle(500) "^M^JCCS(N)>", postmilliidle(500) "^M^JCCS(P)>"
log
return
;***************** 電子メールを送信する *****************
SendMail:
##len = length(#1)
if( ##len != 0 )
title #1+"店長宛メール送信中"
else
title "電子メール送信中"
endif
##i = 0
beginloop
readfile @padfile, #line[##i]
#p = part(#line[##i], 0, 3)
if( #p == "SUB" ) #sub = #line[##i]
if( #p == "TO:" ) #id = #line[##i]
##i = ##i + 1
if( ##i > 3 ) breakloop
endloop
#file = @logdir+"\mail."
getdate #date
#year = part(#date, 0, 2)
#month = part(#date, 2, 2)
#day = part(#date, 4, 2)
gettime #time
#hour = part(#time, 0, 2)
#min = part(#time, 2, 2)
##i = length(#sub)
if( ##i > 24 )
#sub = part(#sub, 4, 20)
else
#sub = part(#sub, 4, ##i-4)
endif
if( ##len != 0 )
#id = " "+#1+" "
else
#id = #id+" "
endif
#id = part(#id, 3, 17)
#title = "^M^J^M^J 0 【メール送信】 "+#id+" "+#year+"/"+#month+"/"+#day+" "+#hour+":"+#min+" "+#sub
appendfile #file
if( no ) createfile #file
##i = 0
if( ##len != 0 )
send "1^M"
else
if( @here != "MAIL" )
if( #line[0] == "*MEXP" )
##i = 1
send "GO MAIL^M"
wait "^M^JMAIL>"
send "MEXP^M"
wait "^M^JMAIL>"
send "COM^M"
else
send "SMAIL^M"
endif
else
if( #line[0] == "*MEXP" )
##i = 1
send "MEXP^M"
wait "^M^JMAIL>"
endif
send "COM^M"
endif
endif
wait "終了は行頭で/E)", "修正編集は 300行迄です)"
writefile #file, #title
while( ##i <= 3 )
send #line[##i]+"^M"
writefile #file, #line[##i]
##i = ##i + 1
endwhile
readfile @padfile, #line
writefile #file, #line
while( (#line != "/E") AND (#line != "/POST") )
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
readfile @padfile, #line
if( no )
send "/POST^M"
#line = "/POST"
endif
writefile #file, #line
endwhile
closefile #file
send #line+"^M"
if( #line == "/E" )
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
endif
loopswitch
case "不在通知:^M^J"
log #file
case "^M^JMAIL>"
@here = "MAIL"
breakloop
case "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JPATIO(N)>", "^M^JHP>", "^M^JLIB>", "^M^JBBS>"
breakloop
case "^M^JFORUM>"
breakloop
case "^M^J>"
@here = "UNKNOWN"
breakloop
case "^M^J:"
send "^M"
endloop
log
return
;************** バイナリーメールを送信する ***************
SendBMail:
title "バイナリーメール送信中"
if( @here != "MAIL" )
send "MAIL^M"
loopswitch
case "^M^JMAIL>"
breakloop
case "^M^J>"
breakloop
endloop
@here = "MAIL"
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
send #p+"^M" ; プロトコル指定
wait "^M^J:"
port autobplus = off
readfile @padfile, #file
send #file+"^M" ; ファイル名指定
wait "開始-"
upload #file, bplus
wait "^M^J:"
port autobplus = on
readfile @padfile, #ttl
send #ttl+"^M" ; タイトル指定
wait "^M^J:"
send "1^M"
wait "^M^J:"
readfile @padfile, #id
send #id+"^M" ; 送付先送信
loopswitch
case "送信(1:送信する 2:しない"
wait "^M^J:"
send "1^M"
case "^M^JMAIL>" ; 送信終了
breakloop
case "^M^J>" ; 送信終了
breakloop
case "(1:OK 2:NG)"
wait "^M^J:"
send "1^M"
wait "^M^J:"
readfile @padfile, #line
send #line+"^M" ; 送付先複数送信
case "送信 (1:送信する 2:しない"
wait "^M^J:"
send "1^M"
endloop
#file = @logdir+"\mail."
getdate #date
#year = part(#date, 0, 2)
#month = part(#date, 2, 2)
#day = part(#date, 4, 2)
gettime #time
#hour = part(#time, 0, 2)
#min = part(#time, 2, 2)
##i = length(#ttl)
if( ##i > 20 )
#ttl = part(#ttl, 0, 20)
endif
#id = #id+" "
#id = part(#id, 0, 17)
#title = "^M^J^M^J 0 【B-Mail送信】 "+#id+" "+#year+"/"+#month+"/"+#day+" "+#hour+":"+#min+" "+#ttl
appendfile #file
if( no ) createfile #file
writefile #file, #title
closefile #file
return
;***************** 送信した電子メールをキャンセルする *****************
DelMail:
readfile @padfile, #line
readfile @padfile, #mes
title #line+"へ送信した電子メールをキャンセルします"
#file = @logdir+"\mail."
getdate #date
#year = part(#date, 0, 2)
#month = part(#date, 2, 2)
#day = part(#date, 4, 2)
gettime #time
#hour = part(#time, 0, 2)
#min = part(#time, 2, 2)
##i = length(#mes)
if( ##i > 24 ) #mes = part(#mes, 0, 24)
#title = "^M^J^M^J 0 【メール削除】 "+#line+" "+#year+"/"+#month+"/"+#day+" "+#hour+":"+#min+" "+#mes
appendfile #file
if( no ) createfile #file
writefile #file, #title
closefile #file
readbuffer 0, #buf
if( #buf != "MAIL>" )
send "MAIL^M"
wait "^M^JMAIL>"
@here = "MAIL"
endif
log "MAIL."
send "CAN "+#line+"^M"
loopswitch
case "^M^J>"
breakloop
case "^M^J◆削除対象テキストがありません◆"
wait "^M^JMAIL>"
timeoutmessage "既に相手がメールを読んでしまいました(^^;)", 3
call ErrroLog "メール削除失敗 "+#line
return
endloop
send "1^M"
wait "^M^J:"
log
send #mes+"^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "^M"
wait "^M^JMAIL>"
return
;****************** フォーラムへの書き込み *******************
SendMes:
#tpc = "FALSE"
#inet = "FALSE"
##i = length(#1)
#forum = part(#1, 4, ##i-4)
if( #forum == "bbs" )
title "掲示板へ送信中"
#3 = "BBS"
else
title #forum+"へ送信中"
endif
if( #2 == "FALSE" )
@get = "FALSE"
if( #3 == "FORUM" )
call AccessForum #1 ; フォーラムを移動する
else
call AccessTopic #1
endif
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endif
readfile @padfile, #line
#IsBul = #line
##i = length(#line)
#kind = part(#line , 1, 3)
#root = part(#line, 5, ##i-5)
@froot = @logdir+"\"+#forum+"\"
kind_next1:
switch #kind
case "TPC" ; サブ目次へ移動
#tpc = "TRUE"
#dest = drop(#root, ",")
#root = search(#root, ",")
##i = length(#root)
if( ##i != 0 ) #root = part(#root, 1, ##i-1)
if( length(#dest) == 0 )
#dest = #root
##i = 0
endif
if( length(#dest) == 1 )
@froot = @froot+"SUB0"+#dest+"\"
else
@froot = @froot+"SUB"+#dest+"\"
endif
send #dest+"^M"
loopswitch
case "^M^J>"
if( ##i == 0 ) breakloop
#dest = drop(#root, ",")
#root = search(#root, ",")
##i = length(#root)
if( ##i != 0 ) #root = part(#root, 1, ##i-1)
if( length(#dest) == 0 )
#dest = #root
##i = 0
endif
if( length(#dest) == 1 )
@froot = @froot+"SUB0"+#dest+"\"
else
@froot = @froot+"SUB"+#dest+"\"
endif
@floor[@@layer] = #dest
@@layer = @@layer+1
send #dest+"^M"
case "^M^Jmore>"
send "E^M"
case "^M^JFORUM>"
breakloop
case "^M^JBBS>"
goto get_bbs
case "NetNews"
#inet = "TRUE"
endloop
readfile @padfile, #line
##i = length(#line)
#kind = part(#line , 1, 3)
#root = part(#line, 5, ##i-5)
goto kind_next1
case "MES" ; 本文書き込みか?
if( @logsel == "NORMAL" )
if( length(#root) == 1)
@readsay = @froot+#forum+".M0"+#root
#readrtn = @froot+#forum+".R0"+#root
else
@readsay = @froot+#forum+".M"+#root
#readrtn = @froot+#forum+".R"+#root
endif
else
getdate #date
@readsay = "NIF"+part( #date, 2, 4 )+".LOG"
endif
call MoveMes #line, #2, "CCS", @readsay, #inet ; 会議室移動
if( @flag == "TRUE" ) return ; 会議室が存在しない
if ( #2 == "FALSE" )
send "RTN^M"
log #readrtn
loopswitch
case "^M^J>"
log
send "E^M"
case "^M^JCCS(N)>", "^M^JCCS(P)>"
breakloop
endloop
send "RC MAX^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
send #p+"^M" ; アップロード指定
loopswitch
case "終了は行頭で/E)^M^J"
breakloop
case "^M^J:"
send "1^M"
case "^M^J◆既に"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "コメントを発言として登録("+#forum+":"+#p
send "SAY^M"
endloop
readfile @padfile, #line
while( (#line != "/E") AND (#line != "/POST") )
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
readfile @padfile, #line
if( no )
send "/POST^M"
#line = "/POST"
endif
endwhile
send #line+"^M"
if( #line == "/E")
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
endif
@readreq = "TRUE"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
case "LIB" ; ライブラリへアップロード
if( @readreq == "TRUE" ) call DownMyArticle
#p = part(#line, 1, ##i-1)
if( #p != @library ) ; ライブラリ移動あり
send #p+"^M"
wait "^M^JLIB>"
@library = #p
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
send #p+"^M" ; アップロード方法を指定
wait "^M^J:"
readfile @padfile, #line
send #line+"^M" ; データ名
wait "^M^J:"
send "1^M" ; 確認
wait "^M^J:"
beginloop
readfile @padfile, #line
send #line+"^M" ; キーワード
if( #line == "" ) breakloop
wait "^M^J:"
send "1^M" ; 確認
wait "^M^J:"
endloop
wait "終了は行頭で/E)^M^J"
readfile @padfile, #line
while( (#line != "/E") AND (#line != "/POST") )
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
readfile @padfile, #line
if( no )
send "/POST^M"
#line = "/POST"
endif
endwhile
send #line+"^M"
if(#line == "/E")
wait "^M^J:" ; 修正
send "2^M"
endif
wait "^M^J:" ; 項目
send "1^M"
wait "^M^J:"
readfile @padfile, #file
send #file+"^M" ; ファイル名
wait "開始-"
upload #file, bplus
wait "^M^JLIB>" ; ダウンロード終了
case "BUL" ; 掲示板へ書き込み
if((#3 == "BBS") OR (#tpc == "TRUE"))
send #root+"^M"
wait "^M^JBBS>", "^M^J>"
else
readbuffer 0, #line
if( #line != "BBS>" )
send "BUL^M"
wait "^M^JBBS>", "^M^J>"
endif
endif
send "COM^M" ; アップロード指定
loopswitch
case "終了は行頭で/E) ^M^J"
breakloop
case "^M^J:"
send "1^M"
case "^M^J◆既に"
wait "^M^JBBS>", "^M^J>"
call ErrorLog "掲示板へのアップロード失敗("+#forum+")"
beginloop
readfile @padfile, #line
if( no ) breakloop
if( (#line == "/E") OR (#line == "/POST") ) breakloop
endloop
return
endloop
readfile @padfile, #line
while( (#line != "/E") AND (#line != "/POST") )
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
readfile @padfile, #line
if( no )
send "/POST^M"
#line = "/POST"
endif
endwhile
send #line+"^M"
if( #line == "/E")
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
elseif( #3 == "BBS")
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "1^M"
wait "^M^JBBS>", "^M^J>"
send "E^M"
endif
wait "^M^JBBS>", "^M^J>"
case "OSM" ; オンラインショッピングメール
call SendMail #forum
endswitch
return
;****************** 書き込み削除 *******************
DelTitle:
#tpc = "FALSE"
#inet = "FALSE"
##i = length(#1)
#forum = part(#1, 4, ##i-4)
if( #forum == "bbs" )
title "掲示板の書き込みを削除中"
#3 = "BBS"
else
title "書き込みを削除中("+#forum+")"
endif
if( #2 == "FALSE" )
@get = "FALSE"
switch #3
case "FORUM"
call AccessForum #1 ; フォーラムを移動する
if( @flag == "TRUE" ) return ; フォーラムが存在しない
case "PATIO"
call AccessPatio #4, #5, #forum
if (@flag == "TRUE" ) return
case "TOPIC"
call AccessTopic #1
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endswitch
endif
readfile @padfile, #line
#IsBul = #line
##i = length(#line)
#kind = part(#line , 0, 3)
if( #3 == "PATIO" ) #kind = "PAT"
#root = part(#line, 4, ##i-4)
@froot = @logdir+"\"+#forum+"\"
kind_next2:
switch #kind
case "TPC" ; サブ目次へ移動
#tpc = "TRUE"
#dest = drop(#root, ",")
#root = search(#root, ",")
##i = length(#root)
if( ##i != 0 ) #root = part(#root, 1, ##i-1)
if( length(#dest) == 0 )
#dest = #root
##i = 0
endif
if( length(#dest) == 1 )
@froot = @froot+"SUB0"+#dest+"\"
else
@froot = @froot+"SUB"+#dest+"\"
endif
send #dest+"^M"
loopswitch
case "^M^J>"
if( ##i == 0 ) breakloop
#dest = drop(#root, ",")
#root = search(#root, ",")
##i = length(#root)
if( ##i != 0 ) #root = part(#root, 1, ##i-1)
if( length(#dest) == 0 )
#dest = #root
##i = 0
endif
if( length(#dest) == 1 )
@froot = @froot+"SUB0"+#dest+"\"
else
@froot = @froot+"SUB"+#dest+"\"
endif
@floor[@@layer] = #dest
@@layer = @@layer+1
send #dest+"^M"
case "^M^Jmore>"
send "E^M"
case "^M^JFORUM>"
breakloop
case "^M^JBBS>"
goto get_bbs
case "NetNews"
#inet = "TRUE"
endloop
readfile @padfile, #line
##i = length(#line)
#kind = part(#line , 0, 3)
#root = part(#line, 4, ##i-4)
goto kind_next2
case "MES" ; 本文書き込みか?
#mes = "*"+#line
call MoveMes #mes, #2, "CCS", "NULL", #inet ; 会議室移動
if( @flag == "TRUE" ) return ; 会議室が存在しない
readfile @padfile, #msg
beginloop
readfile @padfile, #num
if( #num == "*END" ) breakloop
send "RD "+#num+"^M"
loopswitch
case "改行のみ :省略)"
wait "^M^J:"
send #msg+"^M"
case "2:NG)"
wait "^M^J:"
send "1^M"
case "2:しない)^M^J:"
send "1^M"
breakloop
case "^M^J◆"
breakloop
endloop
wait "^M^JCCS(P)>", "^M^JCCS(N)>"
endloop
if( #tpc == "TRUE" )
send "T^M"
wait "^M^J>"
endif
case "PAT" ; 本文書き込みか?
#kind = "PATIO"
#root = part(#line, 4, ##i-4)
#mes = "*"+#line
readfile @padfile, #msg
beginloop
readfile @padfile, #num
if( #num == "*END" ) breakloop
send "RD "+#num+"^M"
loopswitch
case "改行のみ :省略)"
wait "^M^J:"
send #msg+"^M"
case "2:NG)"
wait "^M^J:"
send "1^M"
case "2:しない)^M^J:"
send "1^M"
breakloop
case "^M^J◆"
call ErrorLog "書き込み削除失敗("+#forum+")"
breakloop
endloop
wait "^M^JPATIO(P)>", "^M^JPATIO(N)>"
endloop
case "BUL" ; 掲示板へ書き込み
del_bul:
if((#3 == "BBS") OR (#tpc == "TRUE"))
send #root+"^M"
wait "^M^JBBS>", "^M^J>"
else
readbuffer 0, #line
if( #line != "BBS>" )
send "BUL^M"
wait "^M^JBBS>", "^M^J>"
endif
endif
readfile @padfile, #msg
beginloop
readfile @padfile, #num
if( #num == "*END" ) breakloop
send "DELETE "+#num+"^M"
loopswitch
case ":"
send "1^M"
case "^M^JBBS>"
breakloop
case "^M^J◆番号又はコマンド"
wait "^M^JBBS>"
send "DELETE ALL^M"
endloop
endloop
if( #tpc == "TRUE" )
send "T^M"
loopswitch
case "^M^J>"
return
case "^M^JNIFTY-Serve TOP"
@here = "TOP"
endloop
case "TPB"
goto del_bul
endswitch
return
;****************** 退会処理 *******************
FrmQuit:
title #1+"から退会します"
#forum = "*GO "+#1
if( #2 == "FALSE" )
@get = "FALSE"
call AccessForum #forum ; フォーラムを移動する
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endif
send "QUIT^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
#fname = @logdir+"\"+#1+".FRM"
delfile #fname
#fname = @logdir+"\"+#1+".LIB"
delfile #fname
return
;****************** ハンドルの変更 *******************
ChgHandle:
title #1+"でのハンドル名を変更します"
readfile @padfile, #handle
#forum = "*GO "+#1
if( #2 == "FALSE" )
@get = "FALSE"
call AccessForum #forum ; フォーラムを移動する
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endif
send "OPT^M"
wait "^M^J>"
send "3^M"
wait "^M^J:"
send #handle+"^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
return
;*********** ホームパティオへの書き込み *************
SendPatio:
title #1+"へ送信中"
if( @logsel == "NORMAL" )
@readsay = @logdir+"\patio\"+#1+".M01"
else
getdate #date
@readsay = @logdir+"\NIF"+part( #date, 2, 4 )+".LOG"
endif
##i = 0
beginloop
if( @pationame[##i] == #1 )
#id = @patioid[##i]
#password = @patiopasswd[##i]
breakloop
elseif( @pationame[##i] == "END" )
timeoutmessage "パティオ情報が見つかりません", 3
call ErrorLog "パティオ情報が見つからない("+#1+")"
return
endif
##i = ##i+1
endloop
if( #2 == "FALSE" )
call AccessPatio #id, #password, #1
if (@flag == "TRUE" ) return
; send "RC MAX^M"
; wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
endif
readfile @padfile, #line
##i = length(#line)
#p = part(#line, 1, ##i-1)
send #p+"^M" ; アップロード指定
loopswitch
case "終了は行頭で/E)^M^J"
breakloop
case "^M^J:"
send "1^M"
case "^M^J◆既に"
call ErrorLog "書き込み失敗("+#1+")"
beginloop
readfile @padfile, #line
if( no ) breakloop
if( (#line == "/E") OR (#line == "/POST") ) breakloop
endloop
goto skip_patio
endloop
readfile @padfile, #line
while( (#line != "/E") AND (#line != "/POST") )
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
readfile @padfile, #line
if( no )
send "/POST^M"
#line = "/POST"
endif
endwhile
send #line+"^M"
if(#line == "/E")
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
endif
@readreq = "TRUE"
skip_patio:
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
return
;************* ホームパーティへの書き込み **************
SendHP:
title #1+"へ送信中"
if( @logsel == "NORMAL" )
#file = @logdir+"\HP\"+#1
else
getdate #date
#file = @logdir+"\NIF"+part( #date, 2, 4 )+".LOG"
endif
readfile @padfile, #line
if( #line != "*WRITE" ) return ; 書き込み指定がない
##i = 0
beginloop
if( @hpname[##i] == #1 )
#id = @hpid[##i]
#password = @hppasswd[##i]
breakloop
elseif( @hpname[##i] == "END" )
timeoutmessage "ホームパーティ情報が見つかりません", 3
call ErrorLog "ホームパーティ情報が見つからない("+#1+")"
return
endif
##i = ##i+1
endloop
if( #2 == "FALSE" )
call AccessHP #id, #password
if (@flag == "TRUE" ) return
endif
send "WRITE^M"
wait "^M^J:"
readfile @padfile, #line
send #line+"^M"
wait "^M^J:"
send "1^M"
wait "終了は行頭で/E)^M^J"
readfile @padfile, #line
while( (#line != "/E") AND (#line != "/POST") )
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
readfile @padfile, #line
if( no )
send "/POST^M"
#line = "/POST"
endif
endwhile
send #line+"^M"
if(#line == "/E")
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
endif
wait "^M^JHP>"
send "read new^M"
log #file
wait "^M^JHP>"
log
return
;*************** フォーラム登録 *****************
Regist:
readfile @padfile, #line
#subnum = ""
if( #1 == "*NEWSUBFRM" )
readfile @padfile, #subnum
endif
readfile @padfile, #name
title #line+"登録作業中"
@flag = "FALSE"
#fname = @logdir+"\"+#line+".FRM"
log #fname
#p = "GO "+#line
send #p+"^M"
#first = "FALSE"
loopswitch
case postmilliidle(500) "1:フォーラム概要 2:一時利用 3:入会手続き^M^J>"
log
delfile #fname
#first = "TRUE"
send "3^M"
wait "^M^J:"
send #name+"^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "1^M"
case postmilliidle(500) "^M^JFORUM>"
@frmmenu = "OFF"
title #line+"から受信中"
if( #first == "TRUE" )
@get = "TRUE"
call AccessForum "*GO "+#line ; フォーラムを移動する
if( @flag == "TRUE" ) return ; フォーラムが存在しない
else
log
endif
breakloop
case "^M^J正しい", "^M^J◆番号又はコマンドを入力して下さい◆"
timeoutmessage "フォーラム名に誤りがあります", 3
call ErrorLog "フォーラム指定ミス("+#line+")"
@flag = "TRUE"
return
case postmilliidle(500) "^M^J>"
if( #subnum != "" )
send #subnum+"^M"
else
writelog #name+"^M^J"
log
#fnew = @logdir+"\"+#line+".NEW"
delfile #fnew
renamefile #fname, #fnew
breakloop
endif
endloop
if( @frmmenu = "ON" )
title "フォーラムオプション変更中"
call ForumMenuOff #p, #fname
if( @frmmenu == "ERR" )
timeoutmessage "次回巡回時に、サブフォーラム名で登録して下さい", 3
call ErrorLog "サブフォーラムを検出("+#line+")"
return
endif
title #line+"にて処理中"
endif
send "MES^M"
log #line+".FRM" ; フォーラム情報を取得
wait postmilliidle(500) "^M^JFORUM>", postmilliidle(500) "^M^J>"
send "LIB^M"
log #line+".LIB" ; ライブラリ情報を取得
wait postmilliidle(500) "^M^J>", postmilliidle(500) "^M^JFORUM>", postmilliidle(500) "^M^JLIB>"
log
return
;************ フォーラムにアクセス **************
AccessForum:
@flag = "FALSE"
##retry = 0
##i = length(#1)
#p = part(#1, 1, ##i-1)
#frmnews = part(#1, 4, ##i-4)
#fname = @logdir+"\"+#frmnews+".FRM"
#fbak = @logdir+"\"+#frmnews+".BAK"
if( @get == "TRUE" ) renamefile #fname, #fbak
send #p+"^M"
if( @get == "TRUE" ) log #fname ; フォーラム情報を取得
loopswitch
case "^M^Jmore>"
send "^M"
case "続き (改行で表示 E:終了)^M^J>"
send "^M"
case "^M^JFORUM>"
readbuffer 1, #tmp
@frmttl = "^M^J"+#tmp
@frmmenu = "OFF"
log
breakloop
case "^M^J>"
@frmmenu = "ON"
log
breakloop
case "^M^J正しい", "^M^J◆番号又はコマンドを入力して下さい◆"
log
wait "^M^JFORUM>", "^M^J>"
timeoutmessage "フォーラム名に誤りがあります", 3
call ErrorLog "フォーラム指定ミス("+#frmnews+")"
@flag = "TRUE"
delfile #fname
renamefile #fbak, #fname
return
case "^M^J現在、サービスは"
log
wait "^M^JFORUM>", "^M^J>"
##retry = ##retry+1
if( ##retry == 3 )
delfile #fname
renamefile #fbak, #fname
call ErrorLog "フォーラム混雑("+#frmnews+")"
@flag = "TRUE"
return
endif
send #p+"^M"
case "^M^J-保守作業の為しばらくの間御利用頂けません-"
log
wait "^M^JFORUM>", "^M^J>"
delfile #fname
renamefile #fbak, #fname
call ErrorLog "フォーラム保守作業中("+#frmnews+")"
@flag = "TRUE"
return
case "^M^Jリアルタイム会議"
@rtc_frm[@@rtc_no] = #frmnews
@@rtc_no = @@rtc_no + 1
endloop
if( @frmmenu = "ON" )
title "フォーラムオプション変更中"
call ForumMenuOff #p, #frmnews+".FRM"
title #frmnews+"にて処理中"
endif
if(@frmmenu = "OFF")
send "SEND OFF^M"
wait "^M^JFORUM>"
@message = "NULL"
@library = "NULL"
delfile #fbak
else
title #frmnews+"にて異常検出:巡回をスキップします"
@flag = "TRUE"
endif
if( @skippad == "YES" ) return
if( @padname[0] == "END" ) return
if( @gopad == "TRUE" ) return
##j = 0
while( @padname[##j] != "END" )
#fname = #frmnews+".PAD"
if( @padname[##j] == #fname )
@padfile = @padname[##j]
chdir script
openfile @padfile
restoredir
if( yes )
@gopad = "TRUE"
call PAD
@padflag[##j] = "TRUE"
endif
return
endif
##j = ##j+1
endwhile
return
;*************** 会議室を移動する *****************
MoveMes:
@flag = "FALSE"
##i = length(#1)
#p = part(#1, 1, ##i-1)
#q = part(#1, 5, ##i-5)
if( #q == "21" ) ; 掲示板
if( #p != @message )
if( @readreq == "TRUE" ) call DownMyArticle
send "BUL^M"
loopswitch
case "^M^J現在、サービスは大変混雑しています"
wait "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
@flag = "TRUE"
call ErrorLog "掲示板混雑("+#1+")"
return
case "^M^JBBS>"
@message = #p
return
case "◆"
wait "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
@flag = "TRUE"
call ErrorLog "会議室移動ミス("+#1+")"
return
endloop
endif
endif
readbuffer 0, #line
if( (#2 == "FALSE") OR (#line == "LIB>") OR (#line == "BUL>") OR (#line == ">") OR (#line == "FORUM>") )
if( #4 != "NULL" )
appendfile #4
if( no ) createfile #4
writefile #4, @frmttl
closefile #4
log #4
endif
##i = length(#p)
#r = part(#p, 4, ##i-4)
#p = "MES "+#r
if( #5 == "FALSE" )
send #p+"^M" ; フォーラム移動あり
else
send #r+"^M"
endif
loopswitch
case "^M^J現在、サービスは大変混雑しています"
wait "^M^JFORUM>", "^M^J>", "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
@flag = "TRUE"
call ErrorLog "会議室混雑("+#1+")"
return
case "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
breakloop
case "◆該当する会議室がありません◆"
wait "^M^JFORUM>", "^M^J>", "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
call ErrorLog "会議室移動ミス("+#1+")"
@flag = "TRUE"
return
endloop
if( #4 != "NULL" ) log
@message = #p
else
#p = part(#1, 1, ##i-1)
if( #p != @message)
if( @readreq == "TRUE" ) call DownMyArticle
#q = part(#1, 5, ##i-5)
if( #4 != "NULL" ) log #4
send "RX "+#q+"^M" ; フォーラム移動なし
loopswitch
case "^M^J現在、サービスは大変混雑しています"
wait "^M^JFORUM>", "^M^J>", "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
@flag = "TRUE"
call ErrorLog "会議室混雑("+#1+")"
return
case "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
breakloop
case "◆該当する会議室がありません◆"
wait "^M^JFORUM>", "^M^J>", "^M^J"+#3+"(N)>", "^M^J"+#3+"(P)>"
call ErrorLog "会議室移動ミス("+#1+")"
@flag = "TRUE"
return
endloop
if( #4 != "NULL" ) log
##i = length(#p)
#r = part(#p, 4, ##i-4)
#p = "MES "+#r
@message = #p
endif
endif
return
;************ ホームパーティにアクセス **************
AccessHP:
@flag = "FALSE"
##retry = 0
readbuffer 0, #prompt
if( #prompt == "HP>" )
send "MOVE "+#1+"^M"
goto Hp_pass
endif
send "GO HP^M"
loopswitch
case "^M^J>"
breakloop
case "^M^J現在、サービスは"
wait "^M^JFORUM>", "^M^J>", "^M^JMAIL>"
##retry = ##retry+1
if( ##retry == 3 )
call ErrorLog "ホームパーティ混雑("+#1+")"
@flag = "TRUE"
return
endif
timeoutmessage "混雑していてホームパーティに入れません", 10
send "GO HP^M"
endloop
send "1^M"
wait "^M^J:"
send #1+"^M"
Hp_pass:
loopswitch
case "^M^JHP>"
return
case "^M^J:"
breakloop
case "^M^JあなたはまだHome Partyを設定していません", "^M^J◆該当する利用者のHome Partyはありません◆"
wait "^M^J:"
send "2^M"
wait "^M^J>"
timeoutmessage "ホームパーティ設定IDを再度確認してください", 3
call ErrorLog "ホームパーティが存在しない("+#1+")"
@flag = "TRUE"
return
endloop
if( @id == "ID1" ) #idset = %NifID
if( @id == "ID2" ) #idset = %NifID2
if( #idset != #1 )
send #2+"^M"
loopswitch
case "^M^JHP>"
breakloop
case "^M^J◆パスワードが間違っています◆"
timeoutmessage "パスワードに誤りがあります", 3
call ErrorLog "パスワードに誤り("+#1+")"
send "^M^M"
wait "^M^J:"
@flag = "TRUE"
return
endloop
endif
if( @skippad == "YES" ) return
if( @padname[0] == "END" ) return
if( @gopad == "TRUE" ) return
##i = 0
while( @hpid[##i] != "END" )
if( @hpid[##i] == #1 )
##j = 0
while( @padname[##j] != "END" )
#fname = @hpname[##i]+".PAD"
if( @padname[##j] == #fname )
@padfile = @padname[##j]
chdir script
openfile @padfile
restoredir
if( yes )
@gopad = "TRUE"
call PAD
@padflag[##j] = "TRUE"
endif
return
endif
##j = ##j+1
endwhile
breakloop
endif
##i = ##i+1
endwhile
return
;************ ホームパティオにアクセス **************
AccessPatio:
delfile @logdir+"\"+#3+".FRM"
@flag = "FALSE"
##retry = 0
send "GO PATIO^M"
loopswitch
case "^M^J>"
breakloop
case "^M^J現在、サービスは"
wait "^M^JFORUM>", "^M^J>", "^M^JMAIL>"
##retry = ##retry+1
if( ##retry == 3 )
call ErrorLog "ホームパティオ混雑("+#3+")"
@flag = "TRUE"
return
endif
timeoutmessage "混雑していてホームパティオに入れません", 10
send "GO PATIO^M"
endloop
send "2^M"
wait "^M^J:"
send #1+"^M"
if( #1 == "" ) log @logdir+"\"+#3+".FRM"
#fpass = "TRUE"
loopswitch
case "^M^J>"
log
#fpass = "FALSE"
breakloop
case "^M^J:"
breakloop
case "^M^Jあなたはパティオを設定していません"
wait "^M^J:"
send "2^M"
wait "^M^J>"
timeoutmessage "パティオ設定IDを再度確認してください", 3
call ErrorLog "ホームパティオが存在しない("+#3+")"
@flag = "TRUE"
return
case "^M^J◆該当するパティオはありません◆"
wait "^M^J>"
timeoutmessage "パティオ設定IDを再度確認してください", 3
call ErrorLog "ホームパティオが存在しない("+#3+")"
@flag = "TRUE"
return
case "^M^J同意しますか (1: 同意する 2: しない)"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "^M"
wait "^M^J:"
send "1^M"
endloop
if( #fpass == "TRUE" )
send #2+"^M"
log @logdir+"\"+#3+".FRM"
loopswitch
case "^M^J>"
log
breakloop
case "^M^J◆パスワードが間違っています◆"
timeoutmessage "パスワードに誤りがあります", 3
call ErrorLog "パスワードに誤り("+#3+")"
send "^M^M"
wait "^M^J>"
@flag = "TRUE"
return
endloop
endif
send "1^M"
wait "^M^JPATIO(N)>", "^M^JPATIO(P)>"
if( @skippad == "YES" ) return
if( @padname[0] == "END" ) return
if( @gopad == "TRUE" ) return
##i = 0
while( @patioid[##i] != "END" )
if( @patioid[##i] == #1 )
##j = 0
while( @padname[##j] != "END" )
#fname = @pationame[##i]+".PAD"
if( @padname[##j] == #fname )
@padfile = @padname[##j]
chdir script
openfile @padfile
restoredir
if( yes )
@gopad = "TRUE"
call PAD
@padflag[##j] = "TRUE"
endif
return
endif
##j = ##j+1
endwhile
breakloop
endif
##i = ##i+1
endwhile
return
;************ 特設掲示板にアクセス **************
AccessTopic:
##i = length(#1)
#cmd = part(#1, 1, ##i-1)
#name = part(#1, 4, ##i-4)
#file = #name+".FRM"
title #name+"へ移動中"
chdir log
delfile #file
restoredir
send #cmd+"^M"
log #file
loopswitch
case "^M^J>"
breakloop
case "^M^J◆"
wait "^M^J>"
call ErrorLog "特設掲示板アクセス異常 "+#name
@flag = "TRUE"
log
return
endloop
log
return
;************** タイトルリスト読込処理手順 ****************
TITLE:
chdir script
openfile @ttlfile
if( no ) return ; TTLPADファイルがない
#linebuf = ""
beginloop
readfile @ttlfile, #line
if( no ) breakloop ; TTLPAD処理終了
#p = part( #line, 0, 1 )
if( #p == "*" ) ; PAD命令か?
if( #line == "*MYFORUM" ) call PADNAV1.SCR:GetFrmList @logdir
if( #line == "*BBSLIST" ) call PADNAV1.SCR:GetBbsList @logdir
if( #line == "*ALLFORUM" ) call GetAllForum
if( #line == "*BILL" ) call PADNAV1.SCR:ReadBill
elseif( #line == "*CLIP1" ) call ReadClip "1"
elseif( #line == "*CLIP2" ) call ReadClip "2"
elseif( #line == "*CLIP3" ) call ReadClip "3"
elseif( #line == "*GO HP" )
#buf = "FALSE"
readfile @ttlfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
call Hp #line, #buf
elseif( #line == "*GO PATIO" )
#buf = "FALSE"
readfile @ttlfile, #downseq
readfile @ttlfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
call Patio #line, #buf, #downseq
elseif( #line == "*GO TOPIC" )
#buf = "FALSE"
readfile @ttlfile, #place
##len = length(#place)
#line = part(#place, 1, ##len-1)
; if( @here == #line) #buf = "TRUE"
@here = #line
call GetTopic #line, "TITLE", #buf
elseif( #line == "*TITLE" )
#buf = "FALSE"
readfile @ttlfile, #line
if( @here == #line) #buf = "TRUE"
@here = #line
call ReadTitle #line, #buf
endif
endif
endloop
closefile @ttlfile
restoredir
return
;******** クリッピングサービス読込処理手順 *********
ReadClip:
title "クリッピングサービス"
if( @here != "CLIP" )
send "GO CLIP^M"
wait "^M^J>"
send "3^M"
wait "^M^J>"
@here = "CLIP"
endif
send #1+"^M"
loopswitch
case "^M^J◆現在ニュースはクリップされていません◆"
wait "^M^J>"
return
case "^M^J◆入力データエラー◆"
wait "^M^J>"
return
case "^M^Jmore>"
send "^M"
case "^M^J>"
log "clip"+#1+"."
send "ALL^M"
breakloop
endloop
loopswitch
case "^M^J>"
log
send "^M"
breakloop
case "^M^Jnext>"
send "^M"
endloop
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
return
;********* タイトルリスト読込処理手順 **********
ReadTitle:
title #1+"からタイトル受信中"
#p = "*GO "+#1
if( #2 == "FALSE" )
@get = "TRUE"
call AccessForum #p ; フォーラムを移動する
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endif
readfile @ttlfile, #line
if( (#line == "*MESTITLE") OR (#line == "*ARTICLE") ); 会議室タイトルの取得
send "MES^M"
log "tmp.txt"
loopswitch
case "^M^J>", "^M^JFORUM>"
breakloop
case "^M^Jmore>"
send "^M"
endloop
log
#buf = "tmp.txt"
#forum = #1+".FRM"
chdir log
openfile #buf
appendfile #forum
beginloop
readfile #buf, #list
if ( no )
closefile #buf
closefile #forum
delfile #buf
restoredir
breakloop
endif
if( #list != "more>" )
writefile #forum, #list
##p = value(part(#list, 0, 2))
if( part(#list, 12, 4) == " 0" )
@mes[##p] = "NO"
else
@mes[##p] = "YES"
endif
endif
endloop
#flag = "NEW"
#IsBBS = "FALSE"
@limit = "NO"
if( (#line == "*ARTICLE") )
beginloop
readfile @ttlfile, #line
if( (#line == "*LIBTITLE") OR ( #line == "*END") ) breakloop
if( (#line == "*MESTITLE") OR ( #line == "*END") ) breakloop
if( (#line == "*BUL" )
send "BUL^M"
loopswitch
case "^M^JBBS>", "^M^J>"
call GetBulAll #1
#IsBBS = "TRUE"
breakloop
case "^M^J◆この機能は"
#IsBBS = "FALSE"
wait "^M^JFORUM>", "^M^J>", "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "掲示板使用不可("+#1+")"
breakloop
endloop
elseif( part(#line, 0, 2) == "RC" )
@limit = "YES"
##i = length(#line)
@rc = part(#line, 3, ##i-3)
elseif( @mes[value(#line)] == "YES" )
if( #flag == "TRUE" )
send "MES "+#line+"^M"
elseif( #flag == "NEW" )
send #line+"^M"
#flag = "FALSE"
else
send "RX "+#line+"^M"
endif
loopswitch
case "して下さい◆"
wait "^M^J>"
#flag = "TRUE"
call ErrorLog "会議室巡回異常("+#1+")"
breakloop
case "ありません◆"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^J>"
call ErrorLog "会議室巡回異常("+#1+")"
#flag = "FALSE"
breakloop
case "^M^JCCS(N)>", "^M^JCCS(P)>"
if( @limit == "YES" )
send "RC "+@rc+"^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
@limit = "NO"
endif
if( @mrebpl == "YES")
call AllBPlus #1, #line
else
call AllMread #1, #line
endif
#flag = "FALSE"
breakloop
case "^M^J>"
#flag = "TRUE"
breakloop
endloop
endif
endloop
endif
endif
#IsBBS = "FALSE"
@limit = "FALSE"
if( #line == "*MESTITLE" )
beginloop
readfile @ttlfile, #line
if( (#line == "*LIBTITLE") OR ( #line == "*END") ) breakloop
if( (#line == "*BUL" )
send "BUL^M"
loopswitch
case "^M^JBBS>", "^M^J>"
call GetBul #1
#IsBBS = "TRUE"
breakloop
case "^M^J◆この機能は"
#IsBBS == "FALSE"
wait "^M^JFORUM>", "^M^J>", "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "掲示板使用不可("+#1+")"
breakloop
endloop
elseif( (part(#line, 0, 1) == "#") AND (#IsBBS == "TRUE") )
##i = length(#line)
#num = part(#line, 1, ##i-1)
send "READ "+#num+"^M"
log @logdir+"\"+#1+"\"+#1+".M21"
wait "^M^J>"
log
send "^M"
wait "^M^JBBS>"
elseif( part(#line, 0, 2) == "RC" )
@limit = "YES"
##i = length(#line)
@rc = part(#line, 3, ##i-3)
elseif( @mes[value(#line)] == "YES" )
if( #flag == "TRUE" )
send "MES "+#line+"^M"
elseif( #flag == "NEW" )
send #line+"^M"
#flag = "FALSE"
else
send "RX "+#line+"^M"
endif
loopswitch
case "して下さい◆"
wait "^M^J>"
call ErrorLog "会議室巡回異常("+#1+")"
#flag = "TRUE"
breakloop
case "ありません◆"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^J>"
call ErrorLog "会議室巡回異常("+#1+")"
#flag = "FALSE"
breakloop
case "^M^JCCS(N)>", "^M^JCCS(P)>"
if( @limit == "YES" )
send "RC "+@rc+"^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
@limit = "NO"
endif
#file = @logdir+"\"+#1+"\"+#1+".R"+#line
call PADNAV1.SCR:GetMesTitle #file
#flag = "FALSE"
breakloop
case "^M^J現在、サービスは"
wait "^M^J>", "^M^JFORUM>", "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "フォーラム内混雑("+#1+")"
#flag = "TRUE"
breakloop
case "^M^J>"
#flag = "TRUE"
breakloop
endloop
endif
endloop
endif
if( #line == "*LIBTITLE" ) ; ライブラリリストの取得
#fname = @logdir+"\"+#1+".LIB"
#fbak = @logdir+"\"+#1+".BAK"
renamefile #fname, #fbak
readfile @ttlfile, #datenew
readfile @ttlfile, #dateini
send "LIB^M"
log #fname
loopswitch
case "^M^Jmore>"
send "^M"
case "^M^J>"
delfile #fbak
breakloop
case "^M^J-現在、公開ライブラリ"
wait "^M^J>", "^M^JFORUM>", "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "ライブラリが存在しない("+#1+")"
beginloop
readfile @ttlfile, #line
if( #line == "*END" ) breakloop
endloop
log
delfile #fname
renamefile #fbak, #fname
return
case "^M^J現在、サービスは"
wait "^M^J>", "^M^JFORUM>", "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "ライブラリ混雑("+#1+")"
beginloop
readfile @ttlfile, #line
if( #line == "*END" ) breakloop
endloop
log
delfile #fname
renamefile #fbak, #fname
return
case "このフォーラムでは利用できません", "^M^J◆この機能は本"
wait "^M^J>", "^M^JFORUM>", "^M^JCCS(N)>", "^M^JCCS(P)>"
call ErrorLog "ライブラリ利用不可("+#1+")"
beginloop
readfile @ttlfile, #line
if( #line == "*END" ) breakloop
endloop
log
delfile #fname
renamefile #fbak, #fname
return
endloop
log
if( #line != "*END )
readfile @ttlfile, #line
if( #line == "*END" ) return
send #line+"^M"
#file = @logdir+"\"+#1+"\"+#1+".L"+#line
call PADNAV1.SCR:GetLibList #file, #datenew, #dateini
beginloop
readfile @ttlfile, #line
if( #line == "*END" ) breakloop
send "LX "+#line+"^M"
#file = @logdir+"\"+#1+"\"+#1+".L"+#line
call PADNAV1.SCR:GetLibList #file, #datenew, #dateini
endloop
endif
endif
return
;********* 掲示板読取コマンド **********
GetBul:
delfile @logdir+"\"+#1+"\"+#1+".R21"
log @logdir+"\"+#1+"\"+#1+".R21"
send "READ^M"
loopswitch
case postmilliidle(500) "^M^JBBS>"
breakloop
case postmilliidle(500) "^M^J>"
log
send "E^M"
case postmilliidle(500) "^M^Jnext>"
send "^M"
endloop
return
;********* 掲示板読取コマンド(全項目読取) **********
GetBulAll:
log @logdir+"\"+#1+"\"+#1+".M21"
send "READ ALL^M"
loopswitch
case postmilliidle(500) "^M^JBBS>"
breakloop
case postmilliidle(500) "^M^J>"
log
send "E^M"
case postmilliidle(500) "^M^Jnext>"
send "^M"
endloop
return
;********* 掲示板リスト取得コマンド **********
GetBbsTitle:
if(#1 == "1")
#dest = @logdir+"\BBS\BBS.M01"
else
if( length(#1) == 1 )
#dest = @logdir+"\BBS\BBS.R0"+#1
else
#dest = @logdir+"\BBS\BBS.R"+#1
endif
endif
call PADNAV1.SCR:GetBbsList @logdir
title "掲示板リストを取得中"
openfile #dest
while(#buf1 != "番号")
readfile #dest, #buf
if( no ) breakloop
#buf1 = part(#buf, 0, 4)
endwhile
readfile #dest, #buf
##len = length(#buf)
##br = 30
if( ##len > ##br ) #scan = part(#buf, ##br, ##len-##br)
closefile #2
if(#1 == "1")
chdir log
delfile #dest
restoredir
log #dest
send #1+"^M"
else
send #1+"^M"
wait "^M^JBBS>"
chdir log
delfile #dest
restoredir
log #dest
send "READ^M"
endif
loopswitch
case #scan
sendbreak
case "続き (改行で次メニュー E:終了)"
log
wait "^M^J>"
breakloop
case postmilliidle(500) "^M^JBBS>"
breakloop
case postmilliidle(500) "^M^J>"
log
send "E^M"
case postmilliidle(500) "^M^Jnext>"
send "^M"
endloop
return
;********* 端末設定コントロールコマンド **********
SetMenuOff:
send "GO MEMBER^M"
wait "^M^J>"
send "7^M"
wait "^M^J>"
send "3^M"
wait "^M^J:"
send "2^M"
wait "^M^J>"
send "4^M"
wait "^M^J:"
send "2^M"
wait "^M^J>"
@menu = "OFF"
return
SetMenuOn:
send "GO MEMBER^M"
wait "^M^J>"
send "7^M"
wait "^M^J>"
send "3^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
send "4^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
@menu = "ON"
return
;********* フォーラムオプションコマンド **********
ForumMenuOff:
send "GO MEMBER^M"
wait "^M^J>"
send "6^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "^M"
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
send #1+"^M"
log #2
loopswitch
case postmilliidle(500) "^M^JFORUM>"
@frmmenu = "OFF"
breakloop
case postmilliidle(500) "^M^J>"
@frmmenu = "ERR"
breakloop
endloop
log
return
ForumMenuOn:
send "GO MEMBER^M"
wait "^M^J>"
send "6^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "^M"
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
loopswitch
case "^M^J>"
@frmmenu = "ON"
breakloop
case "^M^JFORUM>", "^M^JPATIO(N)>", "^M^JCCS(P)>", "^M^JCCS(N)>"
@frmmenu = "ERR"
breakloop
endloop
return
;*************** シェアウェア送金 *****************
Share:
readfile @padfile, #num
title "シェアウェア送金作業中"
@flag = "FALSE"
send "GO SWREG^M"
wait "^M^J>"
send "3^M"
wait "^M^J>"
send "2^M"
wait "^M^J>"
send "1^M"
wait "^M^J:"
send #num+"^M"
loopswitch
case "^M^J◆"
wait "^M^J:"
timeoutmessage "シェアウェア番号が正しくありません",3
call ErrorLog "シェアウェア番号指定ミス "+#num
send "E^M"
wait "^M^J>"
return
case "^M^J:"
breakloop
endloop
send "1^M"
wait "^M^J:"
question "本当に送金してもいいですか?"
if( yes )
send "1^M"
wait "^M^J:"
send "E^M"
else
send "2^M"
wait "^M^J>", "^M^J:"
send "E^M"
endif
wait "^M^J>"
return
;********* プロフィール登録コマンド **********
SetProf:
readfile @padfile, #fname
openfile #fname
if( no )
timeoutmessage "送信するファイルをオープンできませんでした", 3
call ErrorLog "プロフィールファイルが存在しない "+#fname
return
endif
title "プロフィールを登録中"
send "GO MEMBER^M"
wait "^M^J>"
send "5^M"
wait "^M^J>"
send "2^M"
wait "終了は行頭で/E)^M^J"
beginloop
readfile #fname, #line
if( no ) breakloop
if( #line == "/E" OR #line == "/POST") breakloop
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
endloop
send "/POST^M"
wait "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
return
;********* 特設掲示板のサブメニューを取得するコマンド **********
GetTopic:
if( #2 == "PAD" )
readfile @padfile, #line
else
readfile @ttlfile, #line
endif
restart:
#p = "*GO "+#1
if( #3 == "FALSE" )
call AccessTopic #p ; 特設掲示板に移動する
if( @flag == "TRUE" ) return ; 特設掲示板が存在しない
endif
title #1+"から情報を取得中"
@@layer = 0
##i = length(#line)
@kind = part(#line, 1, 3)
@root = part(#line, 5, ##i-5)
@dest = drop(@root, ",")
@floor[@@layer] = @dest
@@layer = @@layer+1
@root = search(@root, ",")
##i = length(@root)
@root = part(@root, 1, ##i-1)
@froot = @logdir+"\"+#1+"\"
if( length(@dest) == 1 )
@flist = @froot+#1+".R0"+@dest
@flib = @froot+#1+".L0"+@dest
else
@flist = @froot+#1+".R"+@dest
@flib = @froot+#1+".L"+@dest
endif
call getscanstr
chdir log
delfile @flist
restoredir
send @dest+"^M"
log @flist
#conf = "FALSE"
#scanstop = "FALSE"
loopswitch
case @scan
#scanstop = "TRUE"
case "^M^J番号 発言 (未読) 最新 会議室名"
#conf = "TRUE"
case postmilliidle(500) "^M^J>"
log
@forum = @flist
@lib = @flib
if( length(@dest) == 1 )
@froot = @froot+"SUB0"+@dest+"\"
else
@froot = @froot+"SUB"+@dest+"\"
endif
if( ##i == 0 )
send "E^M"
wait postmilliidle(500) "^M^J>"
@tpcflag = "FALSE"
call analize #1, #2
#line = @gotline
if( @tpcflag == "TRUE" )
goto restart
elseif( @tpcflag == "END" )
breakloop
endif
send @dest+"^M"
log @flist
else
@dest = drop(@root, ",")
@root = search(@root, ",")
##i = length(@root)
if( ##i != 0 )
@root = part(@root, 1, ##i-1)
if( length(@dest) == 0 )
@dest = @root
##i = 0
endif
endif
if( length(@dest) == 1 )
@flist = @froot+#1+".R0"+@dest
@flib = @froot+#1+".L0"+@dest
else
@flist = @froot+#1+".R"+@dest
@flib = @froot+#1+".L"+@dest
endif
call getscanstr
@floor[@@layer] = @dest
@@layer = @@layer+1
if( #conf == "FALSE" )
chdir log
delfile @flist
restoredir
else
#conf = "FALSE"
endif
send @dest+"^M"
log @flist
endif
case postmilliidle(500) "^M^JBBS>"
send "READ^M"
loopswitch
case postmilliidle(500) "^M^Jmore>"
send "^M"
case postmilliidle(500) "^M^JBBS>"
log
send "E^M"
case postmilliidle(500) "^M^J>"
@tpcflag = "FALSE"
call analize #1, #2
#line = @gotline
if( @tpcflag == "TRUE" )
goto restart
elseif( @tpcflag == "END" )
breakloop
endif
send @dest+"^M"
breakloop
endloop
if( #line == "*END" ) breakloop
case postmilliidle(500) "^M^JFORUM>"
log
@forum = @flist
@lib = @flib
if( length(@dest) == 1 )
@froot = @froot+"SUB0"+@dest+"\"
else
@froot = @froot+"SUB"+@dest+"\"
endif
if( length(@root) == 1 )
@flist = @froot+#1+".R0"+@root
@flib = @froot+#1+".L0"+@root
else
@flist = @froot+#1+".R"+@root
@flib = @froot+#1+".L"+@root
endif
@dest = @root
beginloop
#flag = "FALSE"
#first = "TRUE"
switch @kind
case "MES"
send "MES^M"
log "tmp.txt"
wait "^M^J>", "^M^JFORUM>"
log
#buf = "tmp.txt"
chdir log
openfile #buf
appendfile @forum
beginloop
readfile #buf, #line
if ( no )
closefile #buf
closefile @forum
delfile #buf
restoredir
breakloop
endif
writefile @forum, #line
##p = value(part(#line, 0, 2))
if( part(#line, 12, 4) == " 0" )
@mes[##p] = "NO"
else
@mes[##p] = "YES"
endif
endloop
beginloop
if( @mes[value(@dest)] == "YES" )
if( #first == "TRUE" )
send @dest+"^M"
#first = "FALSE"
else
send "RX "+@dest+"^M"
endif
loopswitch
case "して下さい◆"
wait "^M^J>"
call ErrorLog "特設掲示板リスト取得ミス("+#1+")"
#flag = "TRUE"
breakloop
case "ありません◆"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^J>"
call ErrorLog "特設掲示板リスト取得ミス("+#1+")"
#flag = "FALSE"
breakloop
case "^M^JCCS(N)>", "^M^JCCS(P)>"
if( @limit == "YES" )
send "RC "+@rc+"^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
@limit = "NO"
endif
call PADNAV1.SCR:GetMesTitle @flist
#flag = "FALSE"
breakloop
case "^M^J>"
#flag = "TRUE"
breakloop
endloop
endif
@tpcflag = "FALSE"
call analize #1, #2
#line = @gotline
if( @tpcflag == "TRUE" )
goto restart
elseif( @tpcflag == "END" )
breakloop
endif
endloop
if( @tpcflag == "END" ) breakloop
case "LIB"
beginloop
if( #2 == "PAD" )
readfile @padfile, #datenew
readfile @padfile, #dateini
else
readfile @ttlfile, #datenew
readfile @ttlfile, #dateini
endif
if( #first == "TRUE" )
send "LIB "+@dest+"^M"
#first = "FALSE"
else
send "LX "+@dest+"^M"
endif
call GetLibList @flib, #datenew, #dateini
@tpcflag = "FALSE"
call analize #1, #2
#line = @gotline
if( @tpcflag == "TRUE" )
goto restart
elseif( @tpcflag == "END" )
breakloop
endif
endloop
if( @tpcflag == "END" ) breakloop
case "TPC"
log @forum
send "MES^M"
loopswitch
case "^M^J>"
log
chdir log
delfile @lib
restoredir
send "LIB^M"
log @lib
loopswitch
case "^M^J>"
log
send "E^M"
case "^M^JLIB>"
log
send "E^M"
case "^M^JFORUM>"
send "E^M"
wait "^M^J>"
breakloop
endloop
breakloop
case "^M^JFORUM>"
send "E^M"
wait "^M^J>"
breakloop
endloop
breakloop
endswitch
endloop
if( @tpcflag == "END" ) breakloop
@tpcflag = "FALSE"
call analize #1, #2
#line = @gotline
if( @tpcflag == "TRUE" )
goto restart
elseif( @tpcflag == "END" )
breakloop
endif
send @dest+"^M"
log @flist
case postmilliidle(500) "^M^JCCS(N)>", postmilliidle(500) "^M^JCCS(P)>"
log
openfile @forum
beginloop
readfile @forum, #line
if ( no )
closefile @forum
breakloop
endif
##p = value(part(#line, 0, 2))
if( part(#line, 12, 4) == " 0" )
@mes[##p] = "NO"
else
@mes[##p] = "YES"
endif
endloop
beginloop
if( @mes[value(@dest)] == "YES" )
if( @limit == "YES" )
send "RC "+@rc+"^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
@limit = "NO"
endif
call PADNAV1.SCR:GetMesTitle @flist
#flag = "FALSE"
endif
@tpcflag = "FALSE"
call analize #1, #2
#line = @gotline
if( @tpcflag == "TRUE" )
goto restart
elseif( @tpcflag == "END" )
breakloop
endif
if( @mes[value(@dest)] == "YES" )
send "RX "+@dest+"^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>"
endif
endloop
breakloop
case "^M^J1:フォーラム概要 2:一時利用 3:入会手続き"
wait "^M^J>"
send "3^M"
wait "^M^J:"
send "^M"
wait "^M^J:"
send "1^M"
wait "^M^J:"
send "1^M"
case postmilliidle(500) "^M^Jmore>"
if( #scanstop == "TRUE" )
log
breakloop
else
send "^M"
endif
endloop
return
analize:
if( #2 == "PAD" )
readfile @padfile, #line
else
readfile @ttlfile, #line
endif
@gotline = #line
if( #line == "*END" )
@tpcflag = "END"
return
endif
##newlayer = 0
##i = length(#line)
#newroot = part(#line, 5, ##i-5)
#newdest = drop(#newroot, ",")
#newroot = search(#newroot, ",")
##i = length(#newroot)
if( ##i != 0 ) #newroot = part(#newroot, 1, ##i-1)
if( length(#newdest) == 0 ) #newdest = #newroot
@froot = @logdir+"\"+#1+"\"
if( length(#newdest) == 1 )
@flist = @froot+#1+".R0"+#newdest
@flib = @froot+#1+".L0"+#newdest
else
@flist = @froot+#1+".R"+#newdest
@flib = @froot+#1+".L"+#newdest
endif
while( #newdest == @floor[##newlayer] )
if( length(#newdest) == 1 )
@froot = @froot+"SUB0"+#newdest+"\"
else
@froot = @froot+"SUB"+#newdest+"\"
endif
##newlayer = ##newlayer+1
if( length(#newroot) == 0 ) breakloop
#newdest = drop(#newroot, ",")
#newroot = search(#newroot, ",")
##i = length(#newroot)
if( ##i != 0 ) #newroot = part(#newroot, 1, ##i-1)
if( length(#newdest) == 0 ) #newdest = #newroot
@forum = @flist
@lib = @flib
if( length(#newdest) == 1 )
@flist = @froot+#1+".R0"+#newdest
@flib = @froot+#1+".L0"+#newdest
else
@flist = @froot+#1+".R"+#newdest
@flib = @froot+#1+".L"+#newdest
endif
endwhile
if( @@layer-##newlayer > 1 )
@tpcflag = "TRUE"
return
endif
#newkind = part(#line, 1, 3)
if( #newkind != @kind )
@kind = #newkind
@tpcflag = "TRUE"
return
endif
@dest = #newdest
@root = #newroot
@@layer = ##newlayer
@floor[@@layer] = #newdest
@@layer = @@layer+1
return
getscanstr:
openfile @flist
while(#buf1 != "番号")
readfile @flist, #buf
if( no ) breakloop
#buf1 = part(#buf, 0, 4)
endwhile
@scan = ""
readfile @flist, #buf
if( yes )
#slash = part(#buf, 8, 1)
if( #slash == "/" ) ##br = 6
#slash = part(#buf, 18, 1)
#colon = part(#buf, 24, 1)
if( (#slash == "/") AND (#colon == ":") ) ##br = 35
if( (#slash == "/") AND (#colon != ":") ) ##br = 30
##len = length(#buf)
if( ##len > ##br ) @scan = part(#buf, ##br, ##len-##br)
endif
closefile @flist
return
;********* サービスメニューからフォーラム一覧を取得するコマンド **********
GetAllForum:
title "全フォーラム一覧を取得中"
chdir log
delfile "allfrm.log"
restoredir
log "allfrm.log"
send "GO FLIST^M"
wait "^M^J>"
log
##i = 1
#flag = "FALSE"
while(##i < 20)
send @num[##i]+"^M"
log "allfrm.log"
loopswitch
case "^M^J>"
log
breakloop
case "^M^J◆番号又は"
call ErrorLog "フォーラム一覧取得ミス"
#flag = "TRUE"
case "^M^Jmore>"
send "^M"
case "^M^J番号 (改行で次頁)"
send "^M"
endloop
if( #flag == "TRUE" ) breakloop
send "E^M"
wait "^M^J>"
##i = ##i + 1
endwhile
log
return
;********* シスオペ宛メール送信 **********
ToSysop:
title #1+"のSysop宛にメールを送信します"
#forum = "*GO "+#1
if( #2 == "FALSE" )
@get = "FALSE"
call AccessForum #forum ; フォーラムを移動する
if( @flag == "TRUE" ) return ; フォーラムが存在しない
endif
send "sym^M"
loopswitch
case "^M^J>"
send "1^M"
wait "^M^J本文(300 行まで 終了は行頭で/E)"
beginloop
readfile @padfile, #line
if( no ) breakloop
if( #line == "/E" OR #line == "/POST") breakloop
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
endloop
send "/POST^M"
loopswitch
case "^M^JSYSOP 宛メール"
timeoutmessage "本文がありません", 3
call ErrorLog "SYSOP宛メールに本文がない "+#1
case "^M^J>"
breakloop
case "^M^JFORUM>"
breakloop
endloop
breakloop
case "^M^J◆"
wait "^M^JFORUM>"
timeoutmessage "メールの送信が出来ませんでした", 3
call ErrorLog "SYSOP宛メール送信ミス "+#1
breakloop
endloop
return
;********* 書き込みダウンロード **********
DownMyArticle:
if( @article == "NO" )
send "RC D^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JPATIO(N)>", "^M^JPATIO(P)>"
@readreq = "FALSE"
return
endif
log @readsay
send "MRE MODE:NEW^M"
wait postmilliidle(500) "^M^JCCS(N)>", postmilliidle(500) "^M^JCCS(P)>", postmilliidle(500) "^M^JPATIO(N)>", postmilliidle(500) "^M^JPATIO(P)>"
log
send "RC D^M"
wait "^M^JCCS(N)>", "^M^JCCS(P)>", "^M^JPATIO(N)>", "^M^JPATIO(P)>"
@readreq = "FALSE"
return
;********* 不在通知登録コマンド **********
SetFuzai:
if( @fuzai == "TRUE" )
title "不在通知を解除中"
@here = "MAIL"
send "GO MAIL^M"
wait "^M^JMAIL>"
send "OPT^M"
wait "^M^J>"
send "1^M"
wait "^M^J>"
send "3^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
endif
title "不在通知を登録中"
if( @fuzai != "TRUE" )
send "GO MAIL^M"
wait "^M^JMAIL>"
endif
send "OPT^M"
wait "^M^J>"
send "1^M"
wait "^M^J>"
send "1^M"
wait "終了は行頭で/E)^M^J"
if (@id == "ID1") #file = @logdir+"\fuzai1."
if (@id == "ID2") #file = @logdir+"\fuzai2."
; appendfile #file
; if( no ) createfile #file
createfile #file
beginloop
readfile @padfile, #line
if( no ) breakloop
writefile #file, #line
if( #line == "/E" OR #line == "/POST") breakloop
#com = part(#line, 0, 2)
if( ( @comment == "NO" ) OR ( #com != "//" ) ) send #line+"^M"
endloop
closefile #file
send "/POST^M"
loopswitch
case "^M^J:"
send "2^M"
wait "^M^J:"
send "1^M"
case "^M^J>"
breakloop
endloop
send "E^M"
wait "^M^JMAIL>", "^M^J>"
return
;********* 不在通知解除コマンド **********
ResetFuzai:
if( @fuzai == "FALSE" )
timeoutmessage "不在通知が登録されていません", 3
call ErrorLog "不在通知が登録されていないのに解除しようとした"
return
endif
title "不在通知を解除中"
@here = "MAIL"
send "GO MAIL^M"
wait "^M^JMAIL>"
send "OPT^M"
wait "^M^J>"
send "1^M"
wait "^M^J>"
send "3^M"
wait "^M^J:"
send "1^M"
wait "^M^J>"
send "E^M"
wait "^M^JMAIL>", "^M^J>"
return
;********* パスワード変更コマンド **********
ChangePass:
writebuffer2 "^M^Jログインチェック:前回ログアウトの日付が記録と一致しません^M^J>"
timeoutquestion "このまま巡回を続けますか?", 5
if( no )
TryAgain:
beginloop
secretinput "新しいパスワードを入力して下さい", %%NewPass
secretinput "再度、新しいパスワードを入力して下さい", %%NewPass1
##i = length(%%NewPass)
if(( ##i >= 6) and ( %%NewPass == %%NewPass1 )) breakloop
if( ##i == 0 )
message "それでは、後程パスワードを変更して下さい"
return
endif
message "パスワードが正しく入力されていません。再度入力して下さい"
endloop
send "GO MEMBER^M"
wait "^M^J>"
send "2^M"
wait "^M^J:"
if( @id == "ID1" ) #passset = %%NifPassword
if( @id == "ID2" ) #passset = %%NifPass2
send #passset+"^M"
wait "^M^J:"
send %%NewPass+"^M"
loopswitch
case "^M^J◆パスワードの入力形式"
wait "^M^J:"
timeoutquestion "パスワードがシステム仕様に合いません。このまま巡回しますか?", 5
if ( yes )
send "^M"
wait "^M^J>"
return
endif
goto TryAgain
case "^M^J新パスワード"
wait "^M^J:"
send %%NewPass+"^M"
case "^M^Jパスワードはもとのままです。"
wait "^M^J>"
breakloop
case "^M^Jパスワードは変更されました。"
wait "^M^J>"
if( @id == "ID1" ) %%NifPassword = %%NewPass
if( @id == "ID2" ) %%NifPass2 = %%NewPass
breakloop
endloop
endif
return
;********* リアルタイム会議コマンド **********
RTC:
if( @@rtc_no == 0 ) return
##i = 0
beginloop
menu "参加したいリアルタイム会議フォーラムを選択して下さい", \
" 前のページ", \
0, \
" "+@rtc_frm[##i], \
" "+@rtc_frm[##i+1], \
" "+@rtc_frm[##i+2], \
" "+@rtc_frm[##i+3], \
" "+@rtc_frm[##i+4], \
0, \
" 次のページ", \
" 移動しない"
switch result
case -1
#flag = "FALSE"
breakloop
case 0
#flag = "FALSE"
breakloop
case 1
if( ##i < 5 ) ##i = 0
else ##i = ##i - 5
case 2
if( @rtc_frm[##i] != "" )
#forum = "GO "+@rtc_frm[##i]+"^M"
#flag = "TRUE"
breakloop
endif
case 3
if( @rtc_frm[##i+1] != "" )
#forum = "GO "+@rtc_frm[##i+1]+"^M"
#flag = "TRUE"
breakloop
endif
case 4
if( @rtc_frm[##i+2] != "" )
#forum = "GO "+@rtc_frm[##i+2]+"^M"
#flag = "TRUE"
breakloop
endif
case 5
if( @rtc_frm[##i+3] != "" )
#forum = "GO "+@rtc_frm[##i+3]+"^M"
#flag = "TRUE"
breakloop
endif
case 6
if( @rtc_frm[##i+4] != "" )
#forum = "GO "+@rtc_frm[##i+4]+"^M"
#flag = "TRUE"
breakloop
endif
case 7
if( ##i+6 <= @@rtc_no ) ##i = ##i+5
case 8
#flag = "FALSE"
breakloop
case default
#flag = "FALSE"
breakloop
endswitch
endloop
if( #flag = "TRUE" )
send #forum
wait "^M^JFORUM>", "^M^J>"
; runsync "chat.exe"
@logout = "TRUE"
endif
return
;********* 分割PAD処理コマンド **********
RunPad:
if( @padname[0] == "END" ) return
if( @gopad == "TRUE" ) return
##j = 0
beginloop
if( @padname[##j] == "END" ) breakloop
if( @padflag[##j] == "FALSE" )
@padfile = @padname[##j]
chdir script
openfile @padfile
restoredir
if( yes )
@gopad = "TRUE"
call PAD
endif
endif
##j = ##j+1
endloop
return
;********* パスワード変更コマンド **********
ChgPass:
readfile @padfile, #id
readfile @padfile, #newpass
if( #id == "*ID1" ) #oldpass = %%NifPassword
if( #id == "*ID2" ) #oldpass = %%NifPass2
send "GO PASSWORD^M"
wait "^M^J:"
send #oldpass+"^M"
#flag = "OK"
loopswitch
case "◆"
wait "^M^J:"
timeoutmessage "パスワード変更に失敗しました", 3
call ErrorLog "パスワード変更に失敗"
#flag = "NG"
send "^M"
case "^M^J:"
send #newpass+"^M"
case "^M^J>"
breakloop
endloop
if( #flag == "OK" )
if( #id == "*ID1" )
%%NifPassword = #newpass
copyfile "variable.txt", %NifID+".VAR"
endif
if( #id == "*ID2" )
%%NifPass2 = #newpass
copyfile "variable.txt", %NifID2+".VAR"
endif
endif
return