0
プログラムでフォルダを開き、このフォルダを削除するためのテキストを表示したいが、それを動作させることはできない。どんな助けもありがとうございます。スクリプトエディタを開いて、それを削除する質問
on opening folder theResponse
tell application "Finder"
set theName to name of theResponse
activate
display alert "Attention!" message "The folder" & theName & " was opened."
set question to display dialog "Do you want to delete this folder?" buttons {"No", "Yes"} default button "No"
set answer to button returned of question
if answer is equal to "Yes" then
set sourceFolder to theName
move sourceFolder to the trash
end tell
end opening folder