WORK備忘録

メモ

20170710FM

2017-07-09 22:12:52 | 日記
--元画像検索->開く
set fd_folder to "/Users/nagayoshinaoya/Desktop/fm_test/image" --元データ階層
set file_mei to "30011025.jpg"
--do shell script "find " & fd_folder & " -name '" & file_mei & "' | xargs open"

set gt_unpath to do shell script "find " & fd_folder & " -name '" & file_mei & "'"

do shell script "open " & gt_unpath



--ファイルコピー jpeg変換
set mac_path to POSIX file gt_unpath as text

set copy_saki to alias "SLmainHD:Users:nagayoshinaoya:Desktop:fm_test:image:_copy"
set q_folder to "/Users/nagayoshinaoya/Desktop/fm_test/image/_toiawase/"


set copy_saki_unpath to POSIX path of copy_saki

set sc_path to q_folder & "q_" & file_mei & ".png"

do shell script "screencapture -io " & sc_path --スクリーンショット
tell application "Finder"
--try
set phto_copy to duplicate mac_path to copy_saki

do shell script "sips -Z 500 " & copy_saki_unpath & file_mei
do shell script "sips -s format jpeg " & copy_saki_unpath & file_mei

set jpg_rename_ph to copy_saki_unpath & file_mei & ".jpg"

do shell script "mv " & copy_saki_unpath & file_mei & " " & jpg_rename_ph
--end try
end tell

--ファイルメーカー反映

set genko_poto to (POSIX file jpg_rename_ph as text) as alias
set sc_poto to (POSIX file sc_path as text) as alias


set dbName to "fm_tameshi.fp7"
tell application "FileMaker Developer"
tell database dbName
tell table "問い合わせ"

set myRecord to create new record at end
go to myRecord

tell myRecord

set hiduke to (do shell script "date '+%Y.%m.%d'") as string --
set contents of field "日付" to hiduke
set contents of field "品目" to "DBアーカイブ"
--set contents of field "--問い合わせNo." to atai
set contents of field "原稿画像" to genko_poto
set contents of field "保管番号" to file_mei
set contents of field "事前確認" to "スキャン画像
チェックリスト
現物原稿"
set contents of field "問い合わせ有無" to "報告書"
set contents of field "問い合わせ内容チェック" to "カビ
その他"
set contents of field "問い合わせ内容記入欄" to "大きな目立つカビがありました"
set contents of field "問い合わせ箇所" to sc_poto
(*set contents of field "回答" to atai
set contents of field "特記事項" to atai
set contents of field "再度確認" to atai
set contents of field "以降の問い合わせ" to atai*)

end tell


end tell
end tell
end tell

最新の画像もっと見る

コメントを投稿