; ; HSP help index build script ; onitama/onion software 1999-2002 ; #include "hspda.as" ; Use Data-Access DLL #include "mod_hs.as" #packopt name "mkindex" #packopt runtime "hsp2c.hrt" ; sdim cb_group,512 cb_group={"命令概要 プリプロセッサ命令 代入命令 特殊代入命令 プログラム制御命令 基本入出力制御命令 拡張入出力制御命令 オブジェクト制御命令 画面制御命令 拡張画面制御命令 文字列操作命令 メモリ管理命令 マルチメディア制御命令 ファイル操作命令 拡張ファイル操作命令 通信制御命令 OSシステム制御命令 HSPシステム制御命令 その他の命令 "} ; tt="HSP help index builder ver0.8" title tt chdir exedir ; EXEのあるディレクトリをカレントに ; wx=640:wy=480 screen 0,wx,wy,paluse gsel 0,1 sdim ih_msg,$50000 ; メッセージ表示バッファ(320K) sdim ih_list,$10000 ; リスト表示バッファ(64K) cls 1 objmode 1 ih_msg=tt ih_msg+="/ ONION software 1999-2002(c)\n" ih_lsel=0 ; sysfont 17 pos 2,wy-292 mesbox ih_msg,wx-6,286,1 ; ID0 pos 2,0 objsize 300,24 listbox ih_lsel,160,ih_list ; ID1 objsize 120,26 y=4 pos wx-330,y button "keyword表示",*main3 pos wx-130,y+38 button "html作成",*main4 pos wx-130,y+76 button "text作成",*main5 pos wx-130,y button "index作成",*main2 pos wx-130,y+146 button "終了",*owari *main0 ihelp_find "" ih_list = ih_ansbuf notesel ih_list notemax i ih_msg+="Total "+i+" keywords.\n" objprm 0,ih_msg objprm 1,ih_list *main stop *main2 ; index作成 ; gosub *mkidx goto *main0 *main3 ; keyword表示 ; sdim ln,256 if ih_lsel<0 : goto *main notesel ih_list noteget ln,ih_lsel if ln="" : goto *main ihelp_find "" ihelp_open ih_lsel ih_msg="["+ih_ans_key+"] "+ih_ans_title+"\n" if ih_fncprm="" : goto *nofnc ih_msg += ih_ans_key+" "+ih_fncprm+"\n" ih_msg += ih_prminf+"\n" if ih_ans_dll!="" : ih_msg+="("+ih_ans_dll+"が必要です)\n" *nofnc ih_msg+="\n"+ih_info+"\n" ; objprm 0,ih_msg goto *main *kw2lnk ; keyword->filename 変換 ; fc=0 peek fc,t,0 if fc='#' : peek t,t,1 ; 6文字以内にする(廃止) ;if fc='#' : fc=1 : else : fc=0 ;strmid t,t,fc,6 t="s_"+t+".htm" return *makehtm ; html生成sub ; sdim ln,256 sdim wrt,$18000 ; idx書き出しバッファ(96K) ; wrt="
\n" wrt += "\n" sz=0 strlen sz,wrt bsave fname2,wrt,sz ; return *main4 ; html作成main ; sdim cbline,256 ih_htmopt=1 ihelp_find "" ansmax=0 ih_msg="Working...\n" objprm 0,ih_msg await 0 notesel ih_ansbuf notemax ansmax ;goto *mklog repeat ansmax ihelp_open cnt t=ih_ans_key:gosub *kw2lnk fname2="html\\"+t gosub *makehtm ih_msg+="["+fname2+"] process.\n" loop ih_msg+="Total "+ansmax+" html created.\n" *mklog ; catalog作成 ; sdim wrt,$18000 fname2="html\\hspref.htm" fref="" ; wrt="\n" ; if ih_fncprm!="" : goto *fprm ; wrt += "["+ih_ans_title+"]\n" wrt += "\n" goto *nofprm2 *fprm wrt += ih_ans_key+" "+ih_fncprm+" ["+ih_ans_title+"]\n" wrt += "\n" if ih_prminf="" : goto *nofprm2 wrt += "\n" i=0 notesel ih_prminf notemax i repeat i noteget ln,cnt wrt += ln+"
\n" *nofprm2 if ih_ans_dll="" : goto *nofprm3 wrt+="
\n" loop wrt += "( 拡張命令:"+ih_ans_dll+".dllが必要です )\n" *nofprm3 wrt += "
- 説明
\n" wrt += ih_info wrt += "\n
\n" i=0 notesel ih_refinf notemax i if i<1 : goto *nolink wrt += "- 参照
\n" repeat i notesel ih_refinf noteget ln,cnt t=ln:gosub *kw2lnk wrt += "" notesel ih_refsel noteget ln,cnt+1 wrt += ln + "
\n" loop *nolink ; wrt+="
\n"
repeat ansmax
ihelp_open cnt
getstr ih_group, ih_group, 0, 0
if cbline=ih_group {
t=ih_ans_key:gosub *kw2lnk
wrt+= ""
wrt+=ih_ans_key+" "
strlen i,ih_ans_key
if i<8 : wrt+=" "
wrt+=ih_ans_title+"
\n"
}
loop
wrt+="\n" repeat ansmax ihelp_open cnt t=ih_ans_key:gosub *kw2lnk wrt+= "" wrt+=ih_ans_key+" " strlen i,ih_ans_key if i<8 : wrt+=" " wrt+=ih_ans_title+"\n" wrt+="\n" sz=0 strlen sz,wrt bsave fname2,wrt,sz ih_msg+=fname2+" created.\n" ; ; frame索引を作成 ; sdim wrt,$18000 fname2="html\\hsppidxf.htm" ; wrt="
\n" loop ; wrt+="