I started successfully to use InputSelect() with style=1024 to specify a line like
OperandName|13.2
where OperandName is the name of an operand,
and 13.2 is a code for "what to display" when selected, i.e. operand 2 of command 13.
Now an operand is [separator="|"] (I *do* want to show the default!)
So the | is interpreted as separator between caption and data - bad...
Any idea what to do?
OK: the last idea is to specify a wish. But how could the unintended recognition of this fixed separator be disabled?
- define a 2nd sep, special for style=1024? Bad for syntax of InputSelect().
- define some escape char to ignore this | in text? All data must be scanned for |.
- define a new option where fixed-sep=something "exotic"? (I started to use filled triangles and squares for seps.)
- ???
Hm - bad situation. Any help?
Question to InputSelect() style=1024
Question to InputSelect() style=1024
Win11 Pro 223H2 Gerrman
Re: Question to InputSelect() style=1024
It just has to look like a pipe right? could you just replace the | in the string with a unicode equivalent (eg. ┃ << not a pipe) before inputselect is called, or easier before you build the string with the |13.2 part.
Re: Question to InputSelect() style=1024
Hi jupe,
thanks for the idea!
First I thought to "cheat" this way is bad - if e.g. someone copies such a text and wonders about the strange way that pipe works.
But then I noticed that you can't (yet) copy text from inputselect-display
So I think I'll try this, if no other idea will be heared of.
It may last some time, as in the moment I'm restructuring the complete script logic...
...but this was planned, and I hope it will be much more variable that way.
Thanks again!
thanks for the idea!
First I thought to "cheat" this way is bad - if e.g. someone copies such a text and wonders about the strange way that pipe works.
But then I noticed that you can't (yet) copy text from inputselect-display
So I think I'll try this, if no other idea will be heared of.
It may last some time, as in the moment I'm restructuring the complete script logic...
...but this was planned, and I hope it will be much more variable that way.
Thanks again!
Win11 Pro 223H2 Gerrman
Re: Question to InputSelect() style=1024
I am not sure exactly how you intend to use that 13.2 data, but in case you're interested, below is one way of doing what I think you are trying to achieve without style 1024. I just mocked up a few sample entries for this example, in reality you could probably extract all of them from the docs via scripting though.
Code: Select all
$cmds = <<<'>>>'
formatlist(list, [format], [separator="|"], [param], [flags])
quicksearch([query="*"], [path], [separator="<crlf>"], [flags])
regexreplace(string, pattern, [replacement], [matchcase])
zip_list2(zipfile, [separator="|"], [flags], [separatorProperties=<tab>)
>>>;
$sel = inputselect(, $cmds, <crlf>, 0);
if ($sel) {
$sel = regexmatches($sel, "^\w+");
help "idh_scripting_comref.htm#idh_sc_$sel";
}
Re: Question to InputSelect() style=1024
Sorry for being late!
In the moment I'm trying to do as much as I can only by the data I've generated.
And I'm also trying to create "kind of dialogs" with inputselect(). Before I just related on the line number as return - but this is hard if there are not only lines with lists of commands, but especially on top there are "independent" lines.
But I'm still testing out what I can do ...
... am surprised about some found abilities ...
... and am getting new ideas by the way
Sometimes it seems my biggest problem is to find a style for what I want to display
All in all: very interesting.
Thanks for your interest!
In the moment I'm trying to do as much as I can only by the data I've generated.
And I'm also trying to create "kind of dialogs" with inputselect(). Before I just related on the line number as return - but this is hard if there are not only lines with lists of commands, but especially on top there are "independent" lines.
But I'm still testing out what I can do ...
... am surprised about some found abilities ...
... and am getting new ideas by the way
Sometimes it seems my biggest problem is to find a style for what I want to display
All in all: very interesting.
Thanks for your interest!
Win11 Pro 223H2 Gerrman
Re: Question to InputSelect() style=1024
@jupe
I've tested your "not a pipe" character - the results were rather strange: it occupies *2* characters - while (XY as well as my editor) only count 1. Result is that for the rest of the line the cursor is shown misplaced...
But 1 char before or after (don't remember) this "wide" char an equivalent not-wide pipe-like symbol exists, and serves well to show a pipe-like not-a-pipe char.
(What an explanation )
So your tip really helped - thanks again!
I've tested your "not a pipe" character - the results were rather strange: it occupies *2* characters - while (XY as well as my editor) only count 1. Result is that for the rest of the line the cursor is shown misplaced...
But 1 char before or after (don't remember) this "wide" char an equivalent not-wide pipe-like symbol exists, and serves well to show a pipe-like not-a-pipe char.
(What an explanation )
So your tip really helped - thanks again!
Win11 Pro 223H2 Gerrman