While the following might be obvious, it took far longer than it should have to discover because the following information does not exist in a complete simple fashion anywhere. The dictionary entries do not have this information and the one for Paste is bizarre.
Now it will for future beginners.
This does the simplest possible, but probably sufficient for most cases.
(NO "Suspend development Tools" is not helpful - it does nothing to implement cut, copy, paste)
The following code works no matter what state "suspend development tools" menu pick is in
It started from the "autoscript" code - which should really have this as a default.
Code: Select all
--The following menuPick handler was generated by the Menu Builder.
on menuPick pWhich
switch pWhich
case "Cut"
set the clipboarddata[text] to the selectedtext
put empty into the selection
break
case "Copy"
set the clipboarddata[text] to the selectedtext
break
case "Paste"
if the clipboard is text then paste
break
case "Clear"
put empty into the selection
break
case "Preferences"
--Insert script for Preferences menu item here
break
end switch
end menuPick