I tried something like this, it didn't work.
Code: Select all
"A menu item"
//code
"Parent menu item"
load *, "sub1;sub2", s;
"_subitem1 : sub1"
//code
"_subitem2 : sub2"
//code
Code: Select all
"A menu item"
//code
"Parent menu item"
load *, "sub1;sub2", s;
"_subitem1 : sub1"
//code
"_subitem2 : sub2"
//code
Place the underscore on the label instead of the caption:SammaySarkar wrote:Can the load SC load hidden subs?
Code: Select all
"A menu item"
//code
"Parent menu item"
load *, "_sub1;_sub2", s;
"subitem1 : _sub1"
//code
"subitem2 : _sub2"
//codeNo bug, but should be this way, I think.TheQwerty wrote:It might be a bug that it hides them when only the caption is underscored - not sure though.
Right, but the caption does make sense since specifying a label of a hidden script makes it visible and the caption is then displayed.PeterH wrote:As the caption describes the text in the selection list, while hidden says it isn't shown there. So a caption in this place doesn't seem to make sense at all - and the "hidden" identifier belongs to the label.
Code: Select all
"Load Menu" load '*', 'one;_two;three;_four', 's';
"Load Menu Harder" load '*', 'one;_one;two;_two;three;_three;four;_four', 's';
"Load All" load '*', '*', 's';
-
"Load Three" load '*', 'three', 's';
"Load Four" load '*', '_four', 's';
-
"one : one" Status 'one';
"two : _two" Status 'two';
"_three : three" Status 'three';
"_four : _four" Status 'four';* is a special case resource saying load the current resource. Yes, in this case the third argument is not needed and should be omitted.PeterH wrote:The 3rd operand of load as 's' says: "interpret 1st operand as script text" - so here a script with command '*' should have been executed???
This is why I could see the current behavior being considered a bug - the docs say it can be either but that's not exactly true.PeterH wrote:To hide a script simply prefix an underscore to the caption or label (a hidden script does not need a caption anyway).
(I didn't know the "caption or label" part at all!)
Which means you now see it as a bug.PeterH wrote:if any label (hidden or not) is explicitely shown in the list of labels, it's caption is meant to be shown.
Thought 3 times about the answer. Decided to say noTheQwerty wrote:Which means you now see it as a bug.PeterH wrote:if any label (hidden or not) is explicitely shown in the list of labels, it's caption is meant to be shown.
Did you think of this:SammaySarkar wrote:Hey, give my wish back!![]()
Now that everything's clear thanks to TQ (once again), I have no problem if load stays as is.
If you mean the wording "Can the load SC load hidden subs?" you are wrong: not what I wishedSammaySarkar wrote:Can the load SC load hidden subs? If not, consider this a wish.
Are we talking about the same?SammaySarkar wrote:Well, I feel you're now trying to confuse me...![]()
![]()
Load cannot load a sub at all if the caption is _-ed ()
And yes, I did wish that SC load be able to load those hidden subs, just like SC sub can. (btw, sub can load by both hidden captions and hidden labels)
Therefore our wishes do meet.![]()
Code: Select all
"main1" load "*", "_aa";
"main2" load "*", "a";
"main3" load "*", "_a";
"_aa : _a" echo "aa a";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';