Author
Topic: Locate32 Plugin for FARR by Okke (Read 85876 times)

Aahh, rjbull, thanks for noticing that. That would explain it. I'm using 3.0.7.7010 myself so I never hadthat problem. Hopefully upgrading to 3.0.7.9220 fixes the problem cettolox had if he was running the bugged version.

Locate.exe in 7.11040 and in 7.11250 are broken. The latest version which seems to work is in 7.9220, you can extract locate.exe from there. Actually three should not be any changed in locate.exe and updtdb32.exe between 7.9220 and 7.11250 (but somehow those newer files are again broken, argh!).

thanks Lanux. The reason I asked is that I just wrote a quick and dirty little guide for how to set up the locate32 plugin ( http://www.donationc...05.msg91369#msg91369 ). Maybe I should move it here. What do you think ?

Hello.(sorry for my english ) I found a weird bug in locate32 plug-in. It's related to ' (apostrophe) key procsessing in result list. I found same results with ` (accent) key, so maybe other keys are also affected. When in search results are filepaths that include ` or ' then next links are messed up:I see only 3 results (there should be 24). When I use locate.exe manually everything is working fine, every line is correct with CR/LF at end.I have little sugestion. Could you place execution of locate.exe in seperate thread? Because when I'm typing or changing text to search, and results are updated there is a little freeze for a secod or a half. This is only a minor issue, but it would be nice if you can fix that.

I also have a question - is it possible to make loc results scoreable? That's the only thing that prevents me from making Locate plug-in my primary search engine in FARR (will it ever have an indexed search - it's so slooow now. I've reading some old posts about making it in near future, but I don't see indexing on official feature list... will be it ever made?).

the 1st problem you mentioned is related to this: Unicode character problem and this problem has been added to the official "bug tracking" thread. also check out this post for some tips on using FarrLocate.

Just started using FARR yesterday, and remembered the Use locate32 with Farr thread. Cursed a bit at not being able to find the plugin, until I smartened up and just looked at the FARR subforum.

Great work, man, it works like a charm! Only thing I would ask is (if it's possible) to be able to customize the "loc" keyword, I'd prefer "!loc" myself so it doesn't interfere with anything else... also, adding the alt+number "big icon" like FARR itself does would be nice, but not as important

...Only thing I would ask is (if it's possible) to be able to customize the "loc" keyword, I'd prefer "!loc" myself so it doesn't interfere with anything else... also, adding the alt+number "big icon" like FARR itself does would be nice, but not as important

You can do it yourself: Go to Options -> Plugins -> Click To Examine.. -> Select Locate32 -> Change the value in "Override" textboxes to whatever you want!

Well, unicode support would be my next pet peeve, then. But I guess that would require locate to be updated, as /? doesn't mention unicode. Iirc the Windows console API *does* support unicode, so that shouldn't be the limiting factor.

losiek: are you sure about this, also if the *W API forms are used, and a proper console font is selected?

The MSDN entries do sound a bit shoddy, like... WriteConsole being able to handle unicode text, but WriteConsole fails if the console handle is redirected. WriteFile can't write unicode chars to a console buffer, but my guess is that it'll work fine if the standard input is redirected with piping (which is most likely the way the locate plugin works).

So... locate.exe would need to detect if the console handle is a console or redirected, use WriteConsoleW for console handles and WriteFile when redirected.

EDIT: when selecting Lucida Console (instead of a raster font), I was indeed able to get unicode output on a console under WinXP, using the following very quick-and-dirty app. The test was saved with notepad, using the "Unicode" encoding (and editing out the BOM marker). Notice the question marks at the top of the console; I tried the "unitest" application first with a raster font, then switched to lucida console and ran it again.

Apparently windows detects whether the current font supports unicode or not, and doesn't actually output in unicode if it doesn't?Locate32 Plugin for FARR by Okke

@f0dder:Unfortunately I'm not sure how does this stupid console work I think you are right about redirection detection. Look at http://blogs.msdn.co...004/02/25/79621.aspx. That's exactly the same thing you said:) I used that example in my testapp.

Can you redirect your output to a file (if it'll work at all) and then open it using notepad? In my case displaying using WriteConsoleW and WriteFile works fine but redirection works only with WriteFile (WriteConsoleW gives 0-byte file). But when I open created file with notepad I still get messed Unicode characters

I think that Locate should provide option to directly write results to a file (without console and redirection) or simple library interface for searching.