ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

Use locate32 with Farr -- outdated use plugin instead

<< < (5/6) > >>

Armando:
i modified justice's alias a bit but now i seem to have a problem but lack the know-how to correct it. the alias' syntax is "loc <keyword>" but now if i want to search for something that's say "local" then it's broken into "loc al".. so i'm posting here in the hope that some regex expert can help me out.. :)

here is the alias:

--- ---1000>>>locate32>->locate $$1 |C:\Program Files\Locate\Locate32.exe -r $$1>n>locate $$1 with filetype $$2 |C:\Program Files\Locate\Locate32.exe -t $$2 -r $$1>+>^loc(?:\s|)([^\s]*)(?:\s|)([^\s]*)(?:\s|)([^\s]*)(?:\s|)([^\s]*) (see attachment in previous post)
-lanux128 (August 27, 2007, 11:54 PM)
--- End quote ---

By the way, Lanux, I'm no expert but this is what I'd do:

Group Alias Name: "locate32" (I use quotes in all my custom aliases names to avoid triggering them by their name)
RegEx Pattern (optional) : ^loc (.*)
(with a space after ^loc)
Wouldn't that work???

Darwin:
I can't wait - any idea when it's going to go up?

Okke:
Lol Armando, love the "head in the bag" icon. It actually almost looks like me ;)

Hi everyone,

Mouser was talking about me. He's so enthousiastic but I'm still in "hopefully I didn't do any stupid things or forgot something mode"
since it's the first plugin I've written, hadn't touched Delphi in years and have been using FARR only since latest beta.

I wanted to write plugins for FARR but really don't like using C++ so decided to use Delphi instead. I had to convert the C++ framework
to Delphi. To test the framework I decided to make a simple plugin which was actually useful. This ended up being a Locate32 plugin.
Maybe the locate32 integration could have been done differently as well since I'm just learning about the more complex things in FARR
but it works very well for me. Hopefully others enjoy it as well.

I'll try working with Mouser and get it released today or tomorrow.


Below are some usage details for people who like to know how it works. The used options
are from locate itself (locate.exe /?). In the Adv Configuration of the plugin you'll be able
to set the location of locate.exe and the maximum found files (sames as -ln:<number> option).
You can overrule that maximum if you use the -ln:<number> in the search if you don't want
to change it in the adv config.

Some examples for searching:

// Search for notepad in c:\windows, don't search subdirectories, extension has to be exe
loc -t exe -Rn -p c:\windows notepad

// Search for java with minimum creationdate 21 sept 2007 and extension pdf
loc -t pdf -lDc070921 java

// Search for v[a-z]deo, find only directories, treat as regular expression (-r), use path d:\  (-p d:\), don't look in subdirectories (-Rn)
// in my case this found d:\Video
loc -ld -r -p d:\ -Rn v[a-z]deo

Hopefully it's useful to everyone. Btw, if anyone has suggestions, tips or anything else, please yell. I'm not a Delphi developer (I normally
program in Java, Python and others) so there could be things in the framework code as well that could be better. Don't hesitate to
make comments, I like to learn from my mistakes :)

And Mouser, thanks for all the help and for being a great friendly host!  :Thmbsup:

Regards,

Okke

Okke:
I just read some other posts and just to be clear, the plugin returns the results in the FARR results window.
It uses the locate.exe commandline executable to return the results and shows them inside FARR :). FARR itself
handles the execution. If locate returned the directory you can browse it in FARR as well and so on.

Btw jmj, thanks for writing such an excellent searchtool!! It's amazingly fast and works great together with FARR!

TucknDar:
Excellent news, Okke! And welcome to DC :)

Will be fun to play with your plugin, and I love the fact that now I can have the locate results within the FARR window. :up:

Although I can't do any programming myself, it's also cool to hear that you've opened the FARR Plugin door to Delphi programmers as well.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version