I really think my last script perfectly illustrates things:
Code: Select all
"Load Menu" load '*', 'one;_two;three;_four';
"Load Menu Harder" load '*', 'one;_one;two;_two;three;_three;four;_four;five;_five;six;_six;seven;_seven';
"Load All" load '*', '*';
-
"Load One" load '*', 'one';
"Load Two" load '*', '_two';
"Load Three" load '*', 'three';
"Load Four" load '*', '_four';
"Load Five" load '*', 'five';
"Load Six" load '*', '_six';
"Load Seven" load '*', 'seven';
-
-
"one : one" Status 'one';
"two : _two" Status 'two';
"_three : three" Status 'three';
"_four : _four" Status 'four';
"five" Status 'five';
"_six" Status 'six';
_"seven" Status 'seven';
As you can see in the 'Load Menu', 'Load Menu Harder', and 'Load All' scripts that if the
load results in a menu being shown then any script with a caption starting with an underscore will not be displayed regardless of whether its label starts with an underscore.
However, 'Load Three', 'Load Four', and 'Load Six' demonstrate that scripts with underscored captions can still be loaded so it only impacts the displayed menu.
EDIT: Additionally, while placing the underscore before the quotes (case seven) will hide the script from the default menu, it also corrupts the caption when displayed, cannot be called explicitly, or executed at all since it results in an
'_' is not a valid script command. error.
/edit
What does this mean?
Today there are 3 states of visibility:
- Visible
- Neither caption nor label start with underscore.
- Any time these scripts are part of a menu they are shown.
- Hidden by label
- Label starts with an underscore.
- If present the caption does not start with underscore.
- These scripts are only shown in a menu when specified by label or when using the show all label ('*').
- Hidden by caption
- Caption starts with an underscore.
- Whether a label is present or starts with an underscore does not matter.
- These scripts will never appear in a menu, even if specified by label.
In all cases an individual script can be loaded and executed by itself - the visibility only affects whether or not it is shown in a menu.
EDIT 2: The above is not entirely true since XY will automatically execute a script if it is the only one visible within the resource - and consequently will show a menu when more than one is visible.
/edit2
Now the question becomes is it...
1) A feature that allows us to completely hide a script by underscoring its caption.
or
2) A bug since specifying the label should show the script regardless of its visibility.
EDIT: Added some additional cases to illustrate captions without labels and malformed hiding.