f_mulu_r("/storage/sdcard1/Books",".txt")
endh
//主程序:打开文件夹,显示目录,选择并打开文件
function f_mulu_r(path,hzui)
//variable path="/storage/sdcard1/Books"
//variable hzui=".txt" or ".mfps"
if(ls("tem")==1)
f_qk("tem")
else
f_xj("tem")
endif
variable list=list_files(path)
variable k=0
do
k=k+1
if(strsub(list[k-1],strlen(list[k-1])-strlen(hzui),strlen(list[k-1]))==hzui)
f_storage_f("tem",list[k-1])
endif
until(k==size(list)[0])
f_add_hh("tem","temp")
f_xst("temp")
//pause("\n换行键继续…")
variable h=input("\n?输入(行号:hh),(选择编码:u or g):","s")
variable hh=split(h,",")[0]
variable sm=split(h,",")[1]
variable encoding=iff(sm=="u","utf_8",sm=="g","gbk","")
variable fp1=fopen("temp","r","utf_8")
do
variable t=split(freadline(fp1)," //☞第")
if(t[1]==hh)
f_xst(path+"/"+t[0],encoding)
endif
until(feof(fp1))
fclose(fp1)
endf
endh
//主程序:打开文件夹,显示目录,选择并打开文件
function f_mulu_r(path,hzui)
//variable path="/storage/sdcard1/Books"
//variable hzui=".txt" or ".mfps"
if(ls("tem")==1)
f_qk("tem")
else
f_xj("tem")
endif
variable list=list_files(path)
variable k=0
do
k=k+1
if(strsub(list[k-1],strlen(list[k-1])-strlen(hzui),strlen(list[k-1]))==hzui)
f_storage_f("tem",list[k-1])
endif
until(k==size(list)[0])
f_add_hh("tem","temp")
f_xst("temp")
//pause("\n换行键继续…")
variable h=input("\n?输入(行号:hh),(选择编码:u or g):","s")
variable hh=split(h,",")[0]
variable sm=split(h,",")[1]
variable encoding=iff(sm=="u","utf_8",sm=="g","gbk","")
variable fp1=fopen("temp","r","utf_8")
do
variable t=split(freadline(fp1)," //☞第")
if(t[1]==hh)
f_xst(path+"/"+t[0],encoding)
endif
until(feof(fp1))
fclose(fp1)
endf
二师兄他师哥














