error "Expected “end” but found “on”."

Hi,
I try to use an Applescript to set a condition. But I always get an error. What is going wrong?
And the script is from this page:
https://www.noodlesoft.com/manual/hazel ... avascript/

I try to use an Applescript to set a condition. But I always get an error. What is going wrong?
And the script is from this page:
https://www.noodlesoft.com/manual/hazel ... avascript/
- Code: Select all
on hazelMatchFile(theFile, inputAttributes)
— Add your logic here.
— ‘theFile’ is an alias to the file that matched.
— ‘inputAttributes’ is an AppleScript list of the values of any attributes you told Hazel to pass in.
— Be sure to return true or false (or optionally a record) to indicate whether the file passes this script.
end hazelMatchFile
