// 秀丸用CDプレーヤー 曲目リスト作成 // Copyright (C) 1995 田沼英樹 $Keyword=input("キーワードを入力してください。"); $IniFile=hidemarudir; if (strlen($IniFile)>3) $IniFile=$IniFile+"\\"; $IniFile=$IniFile+"cdplayer.ini"; grep "^\\[","cdplayer.ini",hidemarudir,regular; gofiletop; #hWndGrep=hidemaruhandle(0); newfile; #hWndList=hidemaruhandle(0); while (true) { setactivehidemaru #hWndGrep; searchdown "["; if (!result) break; #x=x+1; #y=y; searchdown "]"; $Section=gettext(#x,#y,x,y); $DiscTitle=getinistr($IniFile,$Section,"DiscTitle"); $DiscInfo=getinistr($IniFile,$Section,"DiscInfo"); #Keyword=((!strlen($Keyword))||(strstr($DiscTitle,$Keyword)>=0)||(strstr($DiscInfo,$Keyword)>=0)); #DiscLength=0; #i=0; while (#i=0)||(strstr($Info[#i],$Keyword)>=0)); #i=#i+1; } if (#Keyword) { setactivehidemaru #hWndList; call InsertLength #DiscLength; insert $DiscTitle+"\n"; if (strlen($DiscInfo)) insert "\t\t\t"+$DiscInfo+"\n"; #j=0; while (#j<#i) { insert str(#j+1)+"."; call InsertLength #Length[#j]; insert $Track[#j]+"\n"; if (strlen($Info[#j])) insert "\t\t\t"+$Info[#j]+"\n"; #j=#j+1; } insert "\n"; } } setactivehidemaru #hWndList; closehidemaru #hWndGrep; endmacro; InsertLength: insert "\t("; call InsertNumber ##1/4500; insert ":"; call InsertNumber (##1%4500)/75; insert ":"; call InsertNumber ##1%75; insert ")\t"; return; InsertNumber: $$Number=str(##1); if (strlen($$Number)<2) insert "0"; insert $$Number; return;