--ユーザに出力フォルダーを尋ねる set Root to (choose folder with prompt "Choose PCD Image folder :") as string set MyPCD to "PCD0417" set HTMLfName to "index.html" set HTMLfPath to Root as string set MyFullName to (Root & HTMLfName) as string try create file HTMLfName in alias HTMLfPath on error delete file alias MyFullName create file HTMLfName in alias HTMLfPath end try set MyFile to open file alias MyFullName for writing tell application "ファイルメーカー Pro" activate tell database "ANT PCD DATA" if (enabled of (menu item 1 of menu 5 of application "ファイルメーカー Pro")) then do menu (menu item 1 of menu 5 of application "ファイルメーカー Pro") end if sort by {field named "PCD Name", field named "画像番号"} show (every record whose cell named "PCD Name" = MyPCD) set CountRecord to count record of current layout repeat with c from 1 to CountRecord go to (record c whose cell named "PCD Name" = MyPCD) if c = 1 then set myContents to (get data cell "HTML_ListHead" of current record) as text my WriteFile(MyFile, myContents) end if set myContents to (get data cell "HTML_ListBody" of current record) as text my WriteFile(MyFile, myContents) if c = CountRecord then set myContents to (get data cell "HTML_ListFoot" of current record) as text my WriteFile(MyFile, myContents) end if end repeat end tell end tell close file MyFile on WriteFile(MyFile, myContents) write file MyFile text myContents end WriteFile