2012-11-12 2 views
0

AppleScript를 사용하여 미리 알림의 목록에 특정 순서로 항목을 추가하고 싶습니다. 다음 스크립트를 사용Applescript를 사용하여 Reminders.app의 새 항목을 고정 주문으로 만들 수 있습니까?

그러나, 다른 순서로 내가 그것을 실행할 때마다 항목을 추가합니다

알림 생성 후 짧은 지연을 추가하는 것은 문제 해결 것으로 보인다
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 

답변

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 
+0

이 방법이 효과적이지만 많은 수의 항목에 대해 스크립트가 매우 느려지므로 문제를 해결하기보다는 해결 방법이라고 설명합니다. 나는이 방법으로 그 순간에 나갈 것이지만, 더 좋은 해결책이 있기를 바랍니다. – bmorgan

+0

지연으로 인해 시간 문제를 줄이려면 1 초를 0.5 이하로 줄일 수 있습니다. 스크립트가 작동을 멈추고 사용할 수있는 가장 낮은 번호를 찾을 때까지 작은 시간 길이를 계속 사용하십시오. – regulus6633

관련 문제