|
Post by George on May 13, 2022 10:42:14 GMT -5
Basicaqlly, you want access to the full search ability to select the lines. Pushing some code around isn't the problem, but one stumbling block is how to specify the private clipboard name (if used). Please don't suggest a TO xxx syntax. Parsing is tough enough with no position dependencies between operands.
George
|
|
|
Post by George on May 13, 2022 14:25:58 GMT -5
Robert: A "sort of" although not great solution might be to distinguish the ClipName and the SearchString by whether one was quoted ot not.
e.g. CUT CBname "srch-string" ALL
With an error flagged if both are quoted, or both are unquoted.
George
|
|
|
Post by George on May 14, 2022 12:12:51 GMT -5
Robert: The quoted/unquoted way is still the simplest way. I really can't see it being restrictive to say the search string must be a quoted string. It avoids mucking about with SET and MACROS to accomplish what should be straightforward.
George
|
|
|
Post by George on May 14, 2022 14:25:34 GMT -5
Well, I had thought that anything OTHER than a simple unquoted string would mean a search literal.
Which meant the CUT search would have access to ALL the search criteria - D-type, RegEx, Picture, Colors, etc., the whole ball of wax.
Remember, CUT already calls and uses the universal search routine, it only needs to allow Parse to allow all the optional search criteria. This would be a "re-arrange the code" exercise, not a re-write or new code.
George
|
|
|
Post by George on May 15, 2022 9:03:58 GMT -5
Robert: No to using reserved words, just more "code clutter". It would probably mean changes to PASTE and CLIP as well. And for what?
George
|
|
|
Post by George on May 15, 2022 12:03:15 GMT -5
Robert: OK, done. Except for a couple tiny wrinkles it was pretty straightforward. I'll post a Beta and a revised part of the Doc. Appreciate it if you'd give it a shake-out.
George
[UPDATE] Been playing with it, really useful addition I think. Thanks for the idea.
[/UPDATE]
|
|
|
Post by George on May 15, 2022 14:48:59 GMT -5
Robert: Thanks Frank! (While we're rhyming)
Your suggestion, it does seem like a very nice addition. And it was really trivial to add, maybe 10-20 lines in total.
George
|
|
|
Post by George on May 16, 2022 9:18:11 GMT -5
Well, if you read the attached DOC fle is says:
ALL
Specifies all lines in a filtered range are to be selected. e.g. CUT ALL NX
Note: ALL is assumed for most requests, but you may optionally code it anyway.
[UPDATE]
Sorry didn't spot your 2nd post. I said 'most' out of laziness, I didn't feel like browsing the criteria parse code to see if I could spot exceptions. I'm pretty sure it is now a 'noise' word.
G. [/UPDATE]
|
|
|
Post by George on May 17, 2022 10:30:23 GMT -5
Well, when you overlook some aspects of the way the universal search routine works, this is what you get.
I ignored the way it handles multiple successful 'finds' on on a line. How many P'=' are there in "TONOS-exia" ?
Corrected. I'll shove out a new beta.
George
|
|
|
Post by George on May 17, 2022 12:30:06 GMT -5
LEFT and RIGHT are not even allowed externally. I guess I could have forced LEFT as you suggested, but did it differently. Frankly, I've almost forgotten what LEFT/RIGHT actually do. - - - There's too much stuff like that now as the old grey cells fade away. George
|
|