// 画像リスト作成 Album.mac (2003/09/10) // by IKKI http://www18.big.or.jp/~fujiwara/ikki/ // 書式 // $filename$ => ファイル名 // $width$ => 高さ // $height$ => 幅 // $timestamp$ => タイムスタンプ $Form = "

\"$timestamp$\"

\n"; // 設定 #Recursive = yes; // サブフォルダも検索 (yes/no) $DirSep = "/"; // フォルダ区切り文字(\ は "\\" と書く) // それぞれの拡張子に対してリスト作成 call List "*.jpg"; call List "*.png"; call List "*.gif"; Exit: freedll; endmacro; List: // $$1 = 拡張子 if (rightstr(loaddllfile, 14) != "dengakudll.dll") loaddll "DengakuDLL.dll"; call LoadSPI $$1; $$spi = $$return; if (#Recursive) ##_ = dllfunc("ENUMPATH", "/f . "+$$1); else ##_ = dllfunc("ENUMFILE", ". "+$$1); while (1) { $$pic = dllfuncstr("FINDNEXT"); if ($$pic == "") break; call Subst $$pic, $Form, $$spi; insert $$return; } ##_ = dllfunc("FREESPI"); return; Subst: // テンプレートに従って文字列を生成 // $$1 = 画像ファイル名 // $$2 = テンプレート文字列 // $$3 = Susie プラグイン if (!existfile($$1)) return ""; // 画像情報を取得 ##_ = val(dllfuncstr("GETTOKEN", dllfuncstr("GETPICINFO", $$1), ",")); // left ##_ = val(dllfuncstr("GETTOKEN", "", ",")); // top $$width = dllfuncstr("GETTOKEN", "", ","); $$height = dllfuncstr("GETTOKEN", "", ","); // トークン置換 $$s = $Form; $$s = dllfuncstr("GSUB", $$s, "$filename$", dllfuncstr("GSUB", $$1, "\\", $DirSep, -1), -1); $$s = dllfuncstr("GSUB", $$s, "$width$", $$width, -1); $$s = dllfuncstr("GSUB", $$s, "$height$", $$height, -1); $$s = dllfuncstr("GSUB", $$s, "$timestamp$", dllfuncstr("TIMESTAMPOF", $$1), -1); return $$s; LoadSPI: // 対応するプラグインを見つけてロード // $$1 = 拡張子 ##_ = dllfunc("ENUMPATH", "/f . "+$$1); $$pic = dllfuncstr("FINDNEXT"); if ($$pic == "") return ""; // Susie プラグインのパスを取得 openreg "CURRENTUSER", "Software\\Takechin\\Susie\\Plug-in"; if (result) { $$spipath = getregstr("Path") + "\\"; closereg; } else { return ""; } // 対応するプラグインを見つける ##_ = dllfunc("ENUMFILE", "/r " + $$spipath + "*.spi"); while (true) { $$spi = dllfuncstr("FINDNEXT"); if ($$spi == "") return ""; if (!dllfunc("LOADSPI", $$spipath + $$spi)) continue; if (dllfunc("ISSUPPORTEDPIC", $$pic)) break; else if (#debug) $$loadspi = $$loadspi + $$spi + " ×\n"; ##_ = dllfunc("FREESPI"); } return $$spi;