미리 알림 응용 프로그램에서 미리 알림 데이터를 내보내려고합니다. 아래의 스크립트는 그렇게 할 것입니다. 그러나 매우 오랜 시간이 걸립니다 (첫 번째 반복에는 100 분이 걸리고 두 번째 반복은 여전히 실행 중입니다).Applescript Profiling/Efficiency : 응용 프로그램에서 개체 및 개체 세부 정보 목록 내보내기
나는 (그 중 1,000 주변이 경우) AppleEvents를 전송하는 성능을 죽이는 것입니다,하지만 수정 (내가 script
내부 end script
및 run script
을 스크립트를 캡슐화에 대해 읽고하지만이 할 것 같지 않았다 스파 스 것을 읽고 아무것도).
내가 시도하지 않은 유망하지만 번거로운 방법은 열 열을 모두 따로 따로 가지고 유닉스 paste
을 함께 모으는 것입니다.
진짜 문제는 물론 내 테이블의 모든 셀을 하나씩 찾는 것입니다. rs
에있는 모든 객체 (미리 알림)를 참조로 나열하는 것이 아니라 값별로 자세히 잡아낼 수 있습니까? 그렇다면 나는 그것을 어떻게 해석 할 수 있는가.
#!/usr/bin/osascript
set output to "Title,Notes,Completed,Completion Date,List,Creation Date,Due Date,Modification Date,Remind Me Date,Priority\n"
tell application "Reminders"
set rs to reminders in application "Reminders"
repeat with r in rs
set output to output & "\"" & name of r & "\",\"" & body of r & "\",\"" & completed of r & "\",\"" & completion date of r & "\",\"" & name of container of r & "\",\"" & creation date of r & "\",\"" & due date of r & "\",\"" & modification date of r & "\",\"" & remind me date of r & "\",\"" & priority of r & "\"\n"
end repeat
end tell
return output