It would appear that Canvas' Script Menu does not want to have anything to do with —the clipboard — unless I could run a script to paste in the Dictionary app outside the Canvas Script Menu but I don't know how to do that.
I went back to look at your script. Although you prepare against the
clipboard being empty at the very top:
try --incase the clipboard is empty
set clip to the clipboard --get old clipboard
end try
set the clipboard to "" --clear clipboard word count works
you later
tell application "Canvas™X"
--
copy -- I haven't found how to get the selected text without using the
clipboard in Canvas.
end tell
set dickLookUp to the clipboard
If 'copy' fails, then perhaps dickLookUp fails too. It may be that Canvas's
'copy' is putting something unparseable into the clipboard. However, before
you despair, it seems you missed this comment in 'the clipboard's dictionary
entry:
the clipboard -- Return the contents of an application’s clipboard. Use in a
‘tell’ block after activating the application
You haven't activated the application, have you? So try that first:
tell application "Canvas™X"
activate
set x to selection
--etc.
Of course since you're running it from Canvas's script menu, Canvas ought to
be activated already. But you never know...
It may be that Canvas does not use the standard clipboard and/or whatever it
puts there isn't of a class that can be accessed.
I think this is correct. For some reason Canvas's script menu is not able to access Standard Additions and so it generates the error 'Canvas does not understand «event JonsgClp»' I will take this up with Canvas' support.