Search within selected folders

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
ozzii
Bronze Member
Bronze Member
Posts: 121
Joined: 2005 Jun 01, 05:48

Search within selected folders

Post by ozzii » 2013 May 05, 14:07

Hi,
Can you make an option for that demand.
It's really a lot of work for having it done manually (like you explained):

http://forum.zabkat.com/viewtopic.php?p=61339#61339
http://forum.zabkat.com/viewtopic.php?p=61342#61342
http://forum.zabkat.com/viewtopic.php?p=61345#61345
Last edited by ozzii on 2013 May 13, 10:29, edited 1 time in total.

User avatar
ozzii
Bronze Member
Bronze Member
Posts: 121
Joined: 2005 Jun 01, 05:48

Re: Search with selected folders

Post by ozzii » 2013 May 13, 10:29

Almost 10 days and still no answer :party:

User avatar
nikos
Site Admin
Site Admin
Posts: 14644
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Search within selected folders

Post by nikos » 2013 May 13, 12:09

I believe the original reply is simple enough:
first copy all the selected folder names using Alt+Ctrl+C (comma separated list), then paste in the Look In folder of <Ctrl+F>

User avatar
ozzii
Bronze Member
Bronze Member
Posts: 121
Joined: 2005 Jun 01, 05:48

Re: Search within selected folders

Post by ozzii » 2013 May 13, 12:53

The reply is simple, but like I said in my first post (evidence that I've read you):
It's really a lot of work for having it done manually (like you explained)
Because "CTRl+ALT+C" and "CTRL+F" and "7 back tab" + "CTRL+V" just for this it's a lot of work.....

So I think that an automatic search (under maybe an hidden option) if folders are highlighted it's really better...

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead » 2013 May 13, 13:05

ozzii wrote:So I think that an automatic search (under maybe an hidden option) if folders are highlighted it's really better...
I wouldn't hide it, I'd make it the default, put it front and centre and make sure it had a lifetime supply of margaritas. Even after 4 years of using this programme, not a week goes by that I don't curse Nikos into the bowels of the Earth because of this oversight of logical behaviour. I look at the scrap container's result, say to myself "wait, that's not right... WTF?"

Use your head Nikos, not everyone likes to punish themselves by leaving reason at the door for something so mundane and dispassionate. If I'm going to leave reason at the door, there better be a damn good looking woman on the other side to tempt me into madness.

Searching ain't that sexy.

So just bite the bullet, admit this is just something else you'll never understand about the world, and fix the bloody thing.

Or, give us lots if margaritas and lots of women. Take your choice. :wink:

User avatar
ozzii
Bronze Member
Bronze Member
Posts: 121
Joined: 2005 Jun 01, 05:48

Re: Search within selected folders

Post by ozzii » 2013 May 13, 13:17

I prefer not to be so hard with Nikos :bigsmile:
I just hope that this "normal" behavior would be implemented.

I see that I am not the only one that want that behavior.

User avatar
nikos
Site Admin
Site Admin
Posts: 14644
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Search within selected folders

Post by nikos » 2013 May 13, 13:51

all these years I wouldn't allow myself to be bullied for micro-changes that would only clutter the GUI...
another way to do it is to right click on the folder tabs and pick Copy all paths menu command.

User avatar
ozzii
Bronze Member
Bronze Member
Posts: 121
Joined: 2005 Jun 01, 05:48

Re: Search within selected folders

Post by ozzii » 2013 May 13, 14:11

I don't have a tab for folders...
But this is not helping with the search window !!!!!
I have to do "a lot of" clicks or tab for having the right work.

And I think that this is not for cluttering the GUI but a functionality...

After a little more thinking, I'm sure that this is a functionality.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead » 2013 May 13, 14:41

nikos wrote:all these years I wouldn't allow myself to be bullied for micro-changes that would only clutter the GUI...
Not bullying, simply pointing out the obvious, as sometimes you seem to purposefully miss it - which honestly is a really weird trait you have.

There is no cluttering of the GUI - technically all you need do is shunt the selected folders directly into the search scope as you keep exhorting us to waste our time doing manually. If nothing is "selected", then nothing is passed through. I tried doing this awhile ago with scripting, but the search window is (behind the scenes) rather - umm - "cluttered", considering all the cross-dressing you wrote into it so parts may serve a dual-purpose. Thus my attempts weren't of a reliable standard to be acceptable.

This doesn't require any changes to the GUI at all - it's an "option" purely by context - since now any existing selections are just ignored, they serve no purpose other than to confuse new (and old) users with fallen expectations. The only "real" thing you need worry about is only passing selected folder objects, whittling out files and such. That you can do while taking a nap.

I don't understand the reluctance to add something that is easy to do, logical, requested, and not a hindrance to any existing resource design.

(It's also much cheaper than supplying us with margaritas and loose women. :shrug:)

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead » 2013 May 13, 19:51

Ok, as usual when it comes to margaritas and loose women, we have to supply our own - to that end, I revisited this in scripting, and was more successful this time around.

Using the EXE from the link below, just create a user-command as such:

> "{Path}\LocaleSearch.exe" "$>"

Download: LocaleSearch (Version 0.4.0.4, 13-May-13) Source-code included, as usual.

Effectively this works as expected:
  • If 1 or more folders or drives are selected, this user command will open the Search window, insert the targets (comma-separated with paths) into the "Look in:" dropdown, with focus remaining in the "Named:" control by default.

    If no folders are selected, it simply opens the Search window with the location being the current folder as usual.

    Any foldernames which contain commas (',') will have them automatically doubled (as is necessary in this dialog), so everything remains kosher as expected.

    Any non-folders which happen to be selected will simply be stripped from the list and not be included in the end result.

    Compatible with any x2 translation (i.e., it does not rely upon English labels to locate/verify controls/windows).
The only drawback to this method is that it requires a user-command, so you can't (easily) replace the <Ctrl+F> accelerator itself, but for those happy enough with toolbar buttons or alternate shortcuts, this is acceptable. As the code does not rely upon the usual nonsense of "Send"-ing keystrokes, it's quite robust - at least I haven't been able to intentionally "break it" - which is always a good sign. :wink:
Last edited by Kilmatead on 2017 Apr 24, 16:56, edited 3 times in total.

User avatar
ozzii
Bronze Member
Bronze Member
Posts: 121
Joined: 2005 Jun 01, 05:48

Re: Search within selected folders

Post by ozzii » 2013 May 13, 21:35

Thanks Kilmatead, but for me it's not working.
I always have the folder of the active pane and not the selected one.
I've tried this

Code: Select all

>"%X2DIR%LocaleSearch.exe" $A
and this

Code: Select all

>"%X2DIR%LocaleSearch.exe" "$A"
But it's not working.

I've tried to put x2 in English but same (just in case).

A little help Kilmatead !?

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead » 2013 May 13, 22:11

Well, for one thing you should never put quotations around a token like $A - it should always just be by itself.

Please try this test version... when you run the user command, it will open the dialog, but it won't immediately replace the text - it will first open a small window displaying the list of folders you have selected, and after you close that window the text will be replaced.

If all that works as I described, then this might be a timing issue, and I'll tweak it a bit. However, if you don't get a smaller window with names in it, or the text isn't properly replaced when you close that window, then something else is going wrong. Let me know.

User avatar
nikos
Site Admin
Site Admin
Posts: 14644
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Search within selected folders

Post by nikos » 2013 May 14, 05:25

Kilmatead wrote:There is no cluttering of the GUI
so what if perchance someone had a folder selected when they pressed Ctrl_F, don't you see the collision?

anyway I thought of a more elegant way to do it through the context menu, for the next version!

dunno
Gold Member
Gold Member
Posts: 442
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: Search within selected folders

Post by dunno » 2013 May 14, 05:47

nikos wrote:I thought of a more elegant way to do it through the context menu, for the next version!
Hip Hip Horayyyy

*rushes off to buy some ouzo in gratitude*.

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead » 2013 May 14, 06:54

nikos wrote:...if perchance someone had a folder selected when they pressed Ctrl_F
Somehow I have my doubts about your solution if you don't understand that the whole point of the exercise is to have folders selected when you press <Ctrl+F>. :? You sure we're talking about the same thing?

You're not going to go off and do something cock-eyed again, are you? Remember how you managed to break <Ctrl+Alt+Shift+H> which even I didn't think was possible. :shock:

Post Reply