是否可以使用Applescript以固定顺序创建Mementions.app中的新项目?

是否可以使用Applescript以固定顺序创建Mementions.app中的新项目?,applescript,reminders,Applescript,Reminders,我想能够添加项目,以特定的顺序提醒列表,使用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_r

我想能够添加项目,以特定的顺序提醒列表,使用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

在创建提醒后添加一个短暂的延迟似乎可以解决问题:

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

这是可行的,但我会将其描述为一种变通方法,而不是解决问题,因为它使脚本对于大量项目来说非常缓慢。目前我将使用这种方法,但希望有一个更优雅的解决方案。为了缩短由于延迟而导致的时间问题,您可能可以将1秒缩短到.5秒甚至更短。只需继续使用较小的时间长度,直到脚本停止工作,以找到可以使用的最低数量。