无法输入整数错误 1700 AppleScript
Can't make into type integer error 1700 AppleScript
正在尝试select在提醒应用中列出,以添加提醒。
它给出了错误
错误“提醒有一个错误:无法将 {“BillsTo Pay”} 变成整数类型。”数字 -1700 从 {"BillsTo Pay"} 到整数
我尝试了各种解决方案,none 有效
请告知导致问题的原因,以及任何解决方法。提前Tx
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
改变
in list myList
到
in list named myList
顺便说一下,你的前四行很傻。直接说:
set listNames to (get name of every list)
这是一个很好的公式:
tell application "Reminders"
set listNames to (get name of every list)
set myList to choose from list listNames with prompt "Select the list to add Reminder"
make new reminder in list named myList
set name of result to "My Cool Reminder"
end tell
正在尝试select在提醒应用中列出,以添加提醒。 它给出了错误 错误“提醒有一个错误:无法将 {“BillsTo Pay”} 变成整数类型。”数字 -1700 从 {"BillsTo Pay"} 到整数 我尝试了各种解决方案,none 有效
请告知导致问题的原因,以及任何解决方法。提前Tx
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
改变
in list myList
到
in list named myList
顺便说一下,你的前四行很傻。直接说:
set listNames to (get name of every list)
这是一个很好的公式:
tell application "Reminders"
set listNames to (get name of every list)
set myList to choose from list listNames with prompt "Select the list to add Reminder"
make new reminder in list named myList
set name of result to "My Cool Reminder"
end tell