2
我是新來的applescript甚至這個社區,所以這個問題似乎很奇怪。如果是這樣,我很抱歉。 但我無法在Google搜索中找到答案。所以讓我問。無法理解在分配變量時發生的錯誤
當我運行的代碼
tell application "Evernote"
set theNote to item 1 of selection
set theTitle to (title of theNote)
end tell
我,說
/var/folders/fm/k76y42cs1y98bjwfyf951q1r0000gn/T/vbkvTSQ/55:47:53: execution error: Evernote got an error: Can’t make item 1 of selection into type specifier. (-1700)
一個錯誤,但如果我在下面跑,
tell application "Evernote"
set theNote to (selection)
set theNote to item 1 of theNote
set theTitle to (title of theNote)
end tell
我能得到預期的結果。
爲什麼會發生此錯誤?我看不到兩個代碼的瑕疵。