list pasted into Find box changes to Jon OR Amy OR Dan...

Features wanted...
Post Reply
kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

list pasted into Find box changes to Jon OR Amy OR Dan...

Post by kunkel321 »

Just an idea here...
(and there might already be a smarter way to get the same effect).

I work at a high school and have tons of stuff archived regarding students. Lately I find myself with a list of kids--for example:
Jonny Doe
Amy Smith
Dan Johnson

That I have to do same research on.

My current workflow is to copy-n-paste each name into the <Ctrl+F> Find Box, then drag the needed items to a PaperFolder (or a DropStack Icon, now :ugeek: ). One search per student.

If possible, it would be cool for that Find Box to detect the <Line Feeds> or <carriage returns> or whatever they are, and change them to "OR," such that the above three-line list would get converted to:
Jonny Doe OR Amy Smith OR Dan Johnson when pasted in...

Thots?
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: list pasted into Find box changes to Jon OR Amy OR Dan..

Post by Marco »

It's already doable with scripting, as you probably may have imagined.
You set up the search and save it as search template. Then you write a little script that takes in input the list of scholars > replace <crlf>'s with OR's > setkey such string in the proper key of the search template ini > and finally fires the search.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: list pasted into Find box changes to Jon OR Amy OR Dan..

Post by kunkel321 »

Marco wrote:It's already doable with scripting, as you probably may have imagined....
Thanks for the reply. Yea, I figured it could probably be scripted. Maybe I will post it as a request on the Script sub-forum. As it turns out, I also figured out how to do the replacements via Clipboard Help+Spell, which has text manipulation presets...
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: list pasted into Find box changes to Jon OR Amy OR Dan..

Post by highend »

Maybe I will post it as a request on the Script sub-forum

Code: Select all

copytext replace(formatlist("<clipboard>", "e", "<crlf>"), "<crlf>", " OR ");
One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: list pasted into Find box changes to Jon OR Amy OR Dan..

Post by kunkel321 »

Cool thanks Highend!

I'm curious, what does the "e" do? Is it a temporary variable or something? I've noticed that variables in XY script are often (usually?) single letters...

Might work more on this script if I get a chance... I'll post any questions on the Script Help forum though :biggrin:
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: list pasted into Find box changes to Jon OR Amy OR Dan..

Post by highend »

I'm curious, what does the "e" do?
It belongs to the formatlist command and removes empty items. Otherwise you'd get a trailing " OR" at the end of the line...
One of my scripts helped you out? Please donate via Paypal

Post Reply