To Scripting / Labels
-
PeterH
- Posts: 2829
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
To Scripting / Labels
1) Documentation is missing for the special label "-", which creates a divider line. I think this function is very useful and should be noted here!
2) It seems I don't understand the help for "Labels - Icons and States".
Documentation says:
"Caption|Icon|State : Label" Script
where
State Default = 1
State Checked = 2
State Disabled = 4
Examples say:
"Go C:|C:|1" goto "C:\"; //shown bold
"Go D:|D:|2" goto "D:\"; //shown checked
"Go E:|E:|3" goto "E:\"; //shown bold and checked
Test shows:
- "normal" display
1 bold display (what does "default" mean?)
2 Icon replaced by a check-mark (what does this mean?)
3 not shown at all!
4 gray and not selectable
Oh - more tests show that's not correct! If multiple entries have the 1-bit set, the first is shown bold, while all others containing 1-bit are completely suppressed! So the above line with "3" is suppressed because of the previous line with 1.
6 shows checked, but is not selectable.
As far as I understand the state-value (behind the caption of a script-label) must be a constant? Then an always suppressed label can never be seen and makes no sense? Or am I wrong? This mostly regards the 1-bit: I would understand if this would just say "bold", but not that it suppresses further 1-entries.
As it is now, the example from help as shown above makes no sense, as the 3rd line would be suppressed, and not shown bold and checked!
At the end I don't understand the sense of "default" here.
And would understand and like if it just would mean "bold".
And I don't understand the sense of 2 = checked. You can set it, but it makes no difference (but the check-mark)?
(4 alone can be helpful to write some non-selectable comment line...)
If I'm right this becomes a wish, or half a bug report...
...if I'm wrong please explain.
2) It seems I don't understand the help for "Labels - Icons and States".
Documentation says:
"Caption|Icon|State : Label" Script
where
State Default = 1
State Checked = 2
State Disabled = 4
Examples say:
"Go C:|C:|1" goto "C:\"; //shown bold
"Go D:|D:|2" goto "D:\"; //shown checked
"Go E:|E:|3" goto "E:\"; //shown bold and checked
Test shows:
- "normal" display
1 bold display (what does "default" mean?)
2 Icon replaced by a check-mark (what does this mean?)
3 not shown at all!
4 gray and not selectable
Oh - more tests show that's not correct! If multiple entries have the 1-bit set, the first is shown bold, while all others containing 1-bit are completely suppressed! So the above line with "3" is suppressed because of the previous line with 1.
6 shows checked, but is not selectable.
As far as I understand the state-value (behind the caption of a script-label) must be a constant? Then an always suppressed label can never be seen and makes no sense? Or am I wrong? This mostly regards the 1-bit: I would understand if this would just say "bold", but not that it suppresses further 1-entries.
As it is now, the example from help as shown above makes no sense, as the 3rd line would be suppressed, and not shown bold and checked!
At the end I don't understand the sense of "default" here.
And would understand and like if it just would mean "bold".
And I don't understand the sense of 2 = checked. You can set it, but it makes no difference (but the check-mark)?
(4 alone can be helpful to write some non-selectable comment line...)
If I'm right this becomes a wish, or half a bug report...
...if I'm wrong please explain.
-
jjk
- Posts: 202
- Joined: 10 Oct 2007 20:11
- Location: Paris
Re: To Scripting / Labels
What do you mean, and how can we use that feature ?PeterH wrote:the special label "-", which creates a divider line.
-
PeterH
- Posts: 2829
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: To Scripting / Labels
Copy the following script to "Scripting / Try Script...", execute, and see the line between the 2 selections:jjk wrote:What do you mean, and how can we use that feature ?PeterH wrote:the special label "-", which creates a divider line.
Code: Select all
// Demo
"Script 1 : s1"
msg "Script 1.";
"-"
"Script 2 : s2"
msg "Script 2.";-
jjk
- Posts: 202
- Joined: 10 Oct 2007 20:11
- Location: Paris
Re: To Scripting / Labels
Ah, okay. Thanks.
I have seen "Labels" so I believed it was files labels. Oops.
I have seen "Labels" so I believed it was files labels. Oops.
-
eil
- Posts: 1875
- Joined: 13 Jan 2011 19:44
Re: To Scripting / Labels
@PeterH it must be something on your side 'cause i just tried all the variant you mentioned and all works(they are actually cycling).
Code: Select all
"chose me!|C:|0" msg "0 choise"; #754;//shown normal
"chose me!|C:|1" msg "1 choise"; #754;//shown bold
"chose me!|C:|2" msg "2 choise"; #754;//shown checked
"chose me!|C:|3" msg "3 choise"; #754;//shown bold and checked
-
"chose me!|C:|4" msg "4 choise"; #754;//shown greyed
"chose me!|C:|5" msg "5 choise"; #754;//shown greyed and bold
"chose me!|C:|6" msg "6 choise"; #754;//shown greyed and checked
"chose me!|C:|7" msg "7 choise"; #754;//shown greyed and bold and checked
-
"chose me!|C:|8" msg "8 choise"; #754;//shown normal
"chose me!|C:|9" msg "9 choise"; #754;//shown bold
To see the attached files, you need to log into the forum.
Win 7 SP1 x64 100% 1366x768|1900x1080
-
PeterH
- Posts: 2829
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: To Scripting / Labels
You are righteil wrote:@PeterH it must be something on your side 'cause i just tried all the variant you mentioned and all works(they are actually cycling).Code: Select all
"chose me!|C:|0" msg "0 choise"; #754;//shown normal "chose me!|C:|1" msg "1 choise"; #754;//shown bold "chose me!|C:|2" msg "2 choise"; #754;//shown checked "chose me!|C:|3" msg "3 choise"; #754;//shown bold and checked - "chose me!|C:|4" msg "4 choise"; #754;//shown greyed "chose me!|C:|5" msg "5 choise"; #754;//shown greyed and bold "chose me!|C:|6" msg "6 choise"; #754;//shown greyed and checked "chose me!|C:|7" msg "7 choise"; #754;//shown greyed and bold and checked - "chose me!|C:|8" msg "8 choise"; #754;//shown normal "chose me!|C:|9" msg "9 choise"; #754;//shown bold
Tested: no problem!
Ah: tested again, but not WXP but on W7: Error, 3,5,7,9 not shown!!!
(So you cannot have tested on W7!)
That is: this only occurs on W7!
Thanks for the indirect hint!
And interesting to see: the label "-" also works without the quotes. (Also on W7.)
Curious I also tested '-', but that was no hit: it was displayed exactly as written! I don't understand that!
I thought captions (with or without labels) would be documented as "must be inside double quotes" - but was wrong! It's just so that all examples show it this way. Documentation says:
To set a script caption simply prefix the desired caption to the script, and wrap it in quotes.
So "-" and '-' should work, but (possibly) not -!
OK: I'm afraid Don is needed here...
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: To Scripting / Labels
'-' means: take this as literal -
- or better "-" means: take this as command -
(that is usual for all strings with scripting)
The un-quoted works because that was the history,
and as long as it can't be misinterpreted, it's OK,
but should be quoted to be future-proof.
- or better "-" means: take this as command -
(that is usual for all strings with scripting)
The un-quoted works because that was the history,
and as long as it can't be misinterpreted, it's OK,
but should be quoted to be future-proof.
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: To Scripting / Labels
They all work as expected in Win7, BUT: Win7 applies certain "smart" restrictions as to their combinations: you can only have one default(=bold) item per menu. Apparently it takes the first from top and simply does not display any other bold items. <shrug>
FAQ | XY News RSS | XY X
-
PeterH
- Posts: 2829
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: To Scripting / Labels
Sorry, a silly question: what does default meanadmin wrote:They all work as expected in Win7, BUT: Win7 applies certain "smart" restrictions as to their combinations: you can only have one default(=bold) item per menu. Apparently it takes the first from top and simply does not display any other bold items. <shrug>
I'd understand default as something pre-selected, that's executed, when I don't select something else. E.g. by just pressing "enter". But I don't see any function like that, "enter" just terminates the selection. (Compare "Disabled": it's grayed out, and cannot be clicked. It is disabled.)
- If "Default" does not mean default, but just "Highlite", it should be named like that - and *not* follow the rules for "default entry".
- If it really means "default entry" it should work like that? I just tested: you *can* select any line by cursor move - and then pressing Enter starts this selection. Now if you press enter without moving cursor, *and* there's an entry marked "Default", this should be executed "by default", shouldn't it?
By the way: the action to suppress 2nd default entries is "not so fine". I'd rather expect those entries to appear, but without the default attribute...
(It's an error situation: there only can be 1 default, but more are flagged. If the first is that flagged by error, you even don't have a chance to explicitly select the correct entry...)
...but I see: I don't know how much is your part on the logic, and how much is windows. But at least I think, when the "default" can make any sense, you should have the ability to define what happens if the user just presses Enter?
Besides that, for the flag "Checked": does this mean something else besides the fact that a checkmark is shown?
-
admin
- Site Admin
- Posts: 66366
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: To Scripting / Labels
Up to XP it was all just display/surface. Now Win7 starts getting smart and things get screwed.
FAQ | XY News RSS | XY X
-
PeterH
- Posts: 2829
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: To Scripting / Labels
As long as a default isn't taken as default it isn't smartadmin wrote:Up to XP it was all just display/surface. Now Win7 starts getting smart and things get screwed.
But the attempt of W7 to get smarter is still more bad...
-
PeterH
- Posts: 2829
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: To Scripting / Labels
OK: seems I have to live with the W7-handling of multiple "defaults"...
But possibly overlooked - the very first sentence was:
Documentation is missing for the special [Script-]label "-", which creates a divider line. I think this function is very useful and should be noted here [in Help]!
Would you think about that? As it also can be useful for others...
But possibly overlooked - the very first sentence was:
Documentation is missing for the special [Script-]label "-", which creates a divider line. I think this function is very useful and should be noted here [in Help]!
Would you think about that? As it also can be useful for others...
XYplorer Beta Club