Page 1 of 5

Search within selected folders

Posted: 2013 May 05, 14:07
by ozzii
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

Re: Search with selected folders

Posted: 2013 May 13, 10:29
by ozzii
Almost 10 days and still no answer :party:

Re: Search within selected folders

Posted: 2013 May 13, 12:09
by nikos
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>

Re: Search within selected folders

Posted: 2013 May 13, 12:53
by ozzii
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...

Re: Search within selected folders

Posted: 2013 May 13, 13:05
by Kilmatead
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:

Re: Search within selected folders

Posted: 2013 May 13, 13:17
by ozzii
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.

Re: Search within selected folders

Posted: 2013 May 13, 13:51
by nikos
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.

Re: Search within selected folders

Posted: 2013 May 13, 14:11
by ozzii
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.

Re: Search within selected folders

Posted: 2013 May 13, 14:41
by Kilmatead
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:)

Re: Search within selected folders

Posted: 2013 May 13, 19:51
by Kilmatead
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:

Re: Search within selected folders

Posted: 2013 May 13, 21:35
by ozzii
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 !?

Re: Search within selected folders

Posted: 2013 May 13, 22:11
by Kilmatead
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.

Re: Search within selected folders

Posted: 2013 May 14, 05:25
by nikos
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!

Re: Search within selected folders

Posted: 2013 May 14, 05:47
by dunno
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*.

Re: Search within selected folders

Posted: 2013 May 14, 06:54
by Kilmatead
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: