3
tell 블록 내에서 처리기가 호출되지 않는 이유는 무엇입니까? 오류가 tell SOMETHING
블록 내 -1708Applescript의 tell 블록에서 처리기 호출 오류
on stub() -- method is not called in tell block
end stub
tell application "Finder"
stub()
end tell
tell 블록 내에서 처리기가 호출되지 않는 이유는 무엇입니까? 오류가 tell SOMETHING
블록 내 -1708Applescript의 tell 블록에서 처리기 호출 오류
on stub() -- method is not called in tell block
end stub
tell application "Finder"
stub()
end tell
이며, 애플 스크립트는 SOMETHING
내에서 명령을 찾습니다. 이 경우 application "Finder"
내에서 stub
명령을 찾고 있습니다. 이것은 분명히 존재하지 않습니다. 정의한 함수를 찾기 위해 AppleScript에 알리려면 my stub()
; my
은 application "Finder"
이 아닌 현재 스크립트의 본문을 찾습니다. 이 경우 다음과 같이 표시됩니다.
on stub()
-- ...
end stub
-- ...
stub() -- Works fine
-- ...
tell application "Finder"
-- ...
my stub() -- With the `my`, works fine
-- ...
end tell
대단히 감사합니다. – Dmitry