2

これは私が作成しようとしているスクリプトです。デスクトップに Fido_Data が存在するかどうかを if ステートメントと else ステートメントで確認するスクリプトを作成しようとしていますが、何らかの理由で Finder でエラーが発生しました: AppleEvent ハンドラーが失敗しました。

tell application "Finder"
    if exists folder [homePath & "Desktop/Fido_Data"] then
        set FidoFolderExists to "yes"
    else
        display dialog homePath & "Desktop/"
        make new folder at [homePath & "Desktop/"] with properties {name:"Fido_Data"}
    end if
end tell
4

2 に答える 2

1

試す:

tell application "Finder"
    if exists folder ((path to desktop as text) & "Fido_Data") then
        set FidoFolderExists to "yes"
    else
        display dialog (path to desktop as text)
        make new folder at (path to desktop) with properties {name:"Fido_Data"}
    end if
end tell
于 2013-10-03T17:19:21.980 に答える