0

AppleScript を使用して、特定の順序でリマインダーのリストにアイテムを追加できるようにしたいと考えています。

ただし、次のスクリプトを使用すると、実行するたびに項目が異なる順序で追加されます。

set my_reminders to {"item4", "item3", "item2", "item1", "item"}
tell application "Reminders"
    tell list "Reminders"
        repeat with the_name in my_reminders
            set this_reminder to make new reminder with properties {name:the_name as string}
        end repeat
    end tell
end tell
4

1 に答える 1

1

リマインダーの作成後に短い遅延を追加すると、問題が解決するようです。

set my_reminders to {"item4", "item", "item2", "item1", "item3"}
tell application "Reminders"
    tell list "Reminders"
        repeat with the_name in my_reminders
            set this_reminder to make new reminder with properties {name:the_name as string}
            delay 1
        end repeat
    end tell
end tell
于 2012-11-12T18:34:19.333 に答える