【发布时间】:2020-12-23 13:42:32
【问题描述】:
尝试在 Reminder App 中选择 List,以添加提醒。 它给出了错误 错误“提醒出现错误:无法将 {"BillsTo Pay"} 转换为整数类型。”从 {"BillsTo Pay"} 到整数的数字 -1700 我尝试了各种解决方案,没有一个有效
请告知导致问题的原因,以及任何要解决的指针。提前发送
tell application "Reminders"
set listNames to {}
repeat with aList in lists
copy name of aList to end of listNames
end repeat
--get listNames
(*
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to ", "
set listNames to listNames as text
set AppleScript's text item delimiters to oldDelimiters
get listNames
*)
(*
repeat with x from 1 to (count listNames)
try -- skip errors
set item x of listNames to (item x of listNames as integer)
end try
end repeat
*)
(*
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to ","
set listNames to listNames as list
set AppleScript's text item delimiters to oldDelimiters
*)
set myList to choose from list listNames with prompt "Select the list to add Reminder"
set newremin to (make new reminder in list myList with priority) is 1
end tell
【问题讨论】:
标签: list applescript