2
我正在使用此Applescript在桌面上使用GeekTool显示名为“Cities”的提醒,但出于某种原因,此列表中的每个提醒都没有任何内容打印出“缺失值”。我怎么能做到这一点,所以它不?无法摆脱缺失值
set theList to {}
set theOutput to ""
tell application "Reminders"
repeat with i from 1 to (count of every reminder of list "Cities")
if reminder i of list "Cities" is not completed then
set theList to theList & {name, body} of reminder i of list "Cities"
end if
end repeat
repeat with i from 1 to (count of every item of theList)
set theOutput to (theOutput & item i of theList as string) & return
end repeat
return theOutput
end tell
输出我后:
伊斯坦布尔 - 参观2008年3月 拉斯维加斯 京都 - 参观2012年2月
目前其:
伊斯坦布尔 走访2008 三月拉斯维加斯 京都 访问2012年12月
这有效,但我怎么会,但提醒的身体在同一行作为名称。我可以只串接字符串吗? – Jamie
当然。只需用'(名称的提醒&“ - ”&提醒的主体“)替换提醒的'{name,body}',然后摆脱第二个空串。 – ughoavgfhw