Not sure if I understand this correctly.Help file (Main Topics|Toolbar) wrote:On right-click: Here you can define a separate script for a user button's right-click event. It is merged with the standard right-click menu for user buttons. This means you can have user buttons that do one thing on left-click and pop lots of additional options on right-click.
There's special support for the load command. Example (in field On right-click):
load "test", "foo" //load script labeled "foo" from "test.xys"
The file "test.xys" will be loaded and parsed, and then the context menu is shown, with the standard items (Click, Edit... etc) appended at the bottom. If the file contains only one script, it is not executed directly (as it would be in a "non-Right-Click" load statement) but shown in the menu.
Ofc, I tried it, but before I go with the results of my test, I want to make sure that there is no bug and it all works correctly:
The help says in my understanding ... well, I am really not sure what it says. My tests show that regardless of how the load command is used (with or without "foo"), as long as it is the first line in a normal (non-multi) script inside the right-click field, then that script is immediately executed on right click on the CTB without context menu. If the script starts with a different command than load or if it is a multi-script then the context menu is popped.
So, is that behaviour correct and what does that "special support" mean?
Many thx in advance, S.