我希望能够在一个特定的顺序,使用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发布于 2012-11-13 02:34:19
在创建提醒之后添加一个小延迟似乎就解决了这个问题:
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 tellhttps://stackoverflow.com/questions/13342231
复制相似问题