私は、日曜日にこれに答えようと全力を尽くしています。私は今、敗北を認め、あなたの助けを求めています。私はここやいくつかの他のAppleScriptサイトでいくつかの例を読んだことがありますが、これらのスクリプトはこのスクリプトに適用しても機能しないようです。しかし、私はこれを私に伝えます。このAppleScriptフォルダウォッチで隠しアイテムを無視させる方法を教えてください。
私はフォルダを見るために以下のスクリプトを使用して、新しい項目が追加されたときに私に電子メールを送信しようとしています。私が抱えている問題は、システムフォルダまたは隠しフォルダを無視することです。
私はすべてのことを壊し続けているので、これを行うための私の努力を取り除いたので、下のバージョンは機能しますが、現在は隠しアイテムが含まれています。
property theName : "Name"
property theAddress : "[email protected]"
on adding folder items to this_folder after receiving added_items
set added_Items_List to {}
repeat with oneItem in added_items
set end of added_Items_List to name of (info for oneItem)
end repeat
set {TID, text item delimiters} to {text item delimiters, ", "}
set added_Items_List to added_Items_List as text
set text item delimiters to TID
set dateString to (current date) as string
set theBody to "There are new files in the FTP folder " & name of (info for this_folder) & ":" & return & return & added_Items_List
tell application "Mail"
set newMessage to make new outgoing message with properties {visible:true, subject:"New submissions on FTP: " & dateString, content:theBody}
tell newMessage
make new to recipient at end of to recipients with properties {name:theName, address:theAddress}
end tell
activate
send newMessage
end tell
end adding folder items to
ご意見やご指摘をいただければ幸いです。
類似の問題でこの投稿を閲覧した場合は、これらの投稿のいずれかで問題の回答を見つけることができます。
- Applescript System Events Returns .DS_Store - How can I ignore
- How to I tell this Applescript to skip some files?
- AppleScript : How to get files in folder without hidden files?
私に戻ってくれてありがとう、私は1週間離れていて、ちょうどこれを選んで行動に移しただけです。私は改正を行い、それはすべて動作するようです。私は、FTPアクセス用に設定されたNASドライブでこれを使用していて、ドットで始まらない隠しフォルダーをいくつか持っているので、少し気になりました。 ['Network Trash Folder'、 'Temporary Items'など] – foggynotion