Why a handler is not called within the tell block?
Error is -1708
on stub() -- method is not called in tell block
end stub
tell application "Finder"
stub()
end tell
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Within a
tell SOMETHINGblock, AppleScript looks up commands withinSOMETHING. In this case, it’s looking for astubcommand withinapplication "Finder"; this obviously doesn’t exist. To tell AppleScript to look up the function you’ve defined, you writemy stub(); themyforces it to look in the body of the current script rather than inapplication "Finder". In this case, this gives you: