로그인 할 때보다 스크립트가 있습니다. 사용자가 영화를보고 싶어하는지 묻습니다. 대부분의 경우 잘 작동합니다. 그러나 경우에 따라 알 수없는 이유로 AppleEvent 핸들러 오류가 발생합니다. 이 오류에 대한 다른 게시물을 읽었지만 모두 고유 한 것처럼 보입니다. 가능한 한 누군가가 제 스크립트를 살펴보고 이것이 때때로 나타나는 이유와 그것을 막기 위해 할 수있는 일이 있다면 말해주십시오.AppleScript - AppleEvent 핸들러가 실패했습니다.
알아두면 도움이되는 한 가지 점은이 오류가 발생할 때 스크립트에서 한 가지 실패한 것이 영화가 재생되지 않는다는 것입니다. 그것은 퀵타임에서 시작되지만 시작되지 않습니다.
미리 감사드립니다. 다음은 스크립트입니다.
tell application "Welcome" to activate
set question to display dialog "Would you like a welcome video?" buttons {"No, I've seen it", "Yes, please"} default button 2
set answer to button returned of question
if answer is equal to "Yes, please" then tell application "QuickTime Player"
set theMovie to "Macintosh HD:Library:Desktop Pictures:Mac ML Opening Chalkbaord Video.mov"
set openMovie to open theMovie
present openMovie
play openMovie
delay 30
quit
end tell
if answer is equal to "No, I've seen it" then tell application "Welcome"
quit
tell application "System Events"
delete login item "Welcome"
end tell
end tell
어떤 경우입니까? 어떤 맥락은 먼 길을 갈 수 있습니다. 컨텍스트와 조건에 대한 더 많은 통찰력을 얻을 때 질문을 편집 할 준비를하십시오. –