Welcome Guest.   Make a donation to an author on the site August 30, 2014, 05:24:45 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Use locate32 with Farr -- outdated use plugin instead  (Read 20752 times)
justice
Supporting Member
**
Posts: 1,888



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« on: April 27, 2007, 10:12:08 AM »

I wanted Locate32 to work with FARR but there's no document describing commandline options for the locate32 executable. after I noticed that the first word after locate32 that started with a dash lost part of the searchstring I knew I was on the right track...

After some fiddling I present you the results: If you want to search with locate32 from the command line you can use this:
[copy or print]
locate32 keyword
(to bring up the locate window with your keyword as the search, but it does not run)
[copy or print]
locate32 -r keyword
(to being up the locate window with search results for your keyword)
I couldn't find any documentation on any switches so I assume it's unofficial and might break in the future?? Maybe using some debug tool someone might find other switches, to search for extension for example.

To do this straight from FARR paste this as an preformatted alias group:
[copy or print]
1000>>>locate32>->loc $$1 |C:\Program Files\Locate\Locate32.exe -r $$1>+>^loc (.*)
or create a new alias like this screenshot (change the path to locate32.exe depending on where you installed it):


 Kiss Thmbsup



BTW it shouldn't be hard to write a plugin to use the locate.exe executable to return the search results inside the FARR window, as locate.exe <keyword> does a search for keyword and returns all search results in a dosbox.
« Last Edit: January 14, 2008, 09:58:51 AM by justice » Logged

mouser
First Author
Administrator
*****
Posts: 33,286



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: April 27, 2007, 02:14:28 PM »

very nice  thumbs up
Logged
nitrix-ud
Charter Member
***
Posts: 482

View Profile Give some DonationCredits to this forum member
« Reply #2 on: April 27, 2007, 02:47:02 PM »

FYI, i found command-line parameters in the readme.txt

Quote
6. Command line parameters for locate32


Locate32.exe has the following command line arguments:

Usage: locate32.exe [-p path] [-t type] [-d dbfile] [-r] [-u] text
    or locate32.exe -U [-rX]
    or locate32.exe -s

   text      put 'text' to 'Named field'
   -P path    put 'path' to 'Look in' field
   -p path    put 'path' to 'Look in' field (checks also that path is correct)
   -t type    put 'type' to 'Extensions' field
   -c       put clipboard content to 'Named field'
   -d file      uses database in file 'file'
   -D name      uses database named 'name'
    -Lpath         check directory path
       -L1            check all local hard drives
   -r      start locating when Locate32 is opened
   -u      start update process at start
   -U      update database
   -RX      set the priority class of process, X is 'h' (high), 'a' (above),
         'n' (normal), 'b' (below), 'i' (idle) or 'r' (realtime)
   -s       leave locate32 background when dialog is closed
   -S       start locate32 to background, (adds icon to tastbar)
   -i      start new instance
   -a       activate existing instance (use e.g. "-a2" to activate the 2nd instance)
   -lP preset   load preset      
   -ln      set number of maximum found files
   -lf      Set check field to 'File Names Only'
   -ld      Set check field to 'Folder Names Only'
   -lfd      Set check field to 'File and folder names'
   -lc text   put 'text' to 'file containing text' field
         -lcnm           uncheck 'Match case' field
         -lw             check 'Match whole name only' field
         -lwn            uncheck 'Match whole name only' field
   -lr      check 'Replace spaces with asterisk' field
   -lW      check 'Use whole path' field
   -lrn      uncheck 'Replace spaces with asterisk' field
   -lm size   set minumum file size
   -lM size   set maximum file size
   -lDmDAY     set minimum file modification date, DAY can be exact date in the
         form of YYMMDD, or number (0 is today, 1 is yesterday, etc)
   -lDcDAY     set minimum file creation date
   -lDaDAY     set minimum file last access date
   -lDMDAY     set maximum file modification date
   -lDCDAY     set maximum file creation date
   -lDADAY      set maximum file last access date
   -lsXY      sort located items where X is 'n' (sort by name),
         'f' (directory), 's' (size), 't' (type) or 'd' (modified date)
         and Y is 'a' (ascending order) or 'd' (descending order)
   -X:CUSTOM   use different settings branch (see locate.ini file)
Logged
justice
Supporting Member
**
Posts: 1,888



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: April 27, 2007, 05:04:08 PM »

readme.txt  Grin
Logged

lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: May 02, 2007, 10:10:36 PM »

just curious, but does't Farr's and locate's functions overlap? smiley but i think a plugin is the way to go, so at least one doesn't have to click on locate's search button..
Logged

justice
Supporting Member
**
Posts: 1,888



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: May 03, 2007, 01:20:06 AM »

You don't have to click on the search button smiley the alias will do that for you and just run the search without any further mouse clicks or keyboard input.
The power you get from this combination is that FARR is great in searching and displaying your common folders, but locate already has an index of your whole drive. So if you can't find it in FARR (or are looking for individual documents) then run a 'loc <document>' and the results are in the locate window. I hope that helps clear things up.

edit: ahh we're editing at the same time Wink
« Last Edit: May 03, 2007, 02:51:45 AM by justice » Logged

lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: May 03, 2007, 02:50:23 AM »

you dom't have to click on the search button
really..? now, that's cool.. Cool but i still would like to know why both - Farr & locate? please enlighten this ignoramus.. smiley
Logged

lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: May 03, 2007, 03:16:49 AM »

thanks justice.. now, i understand.. thumbs up
Logged

Laughing Man
Charter Member
***
Posts: 103


V for Viktor

View Profile Give some DonationCredits to this forum member
« Reply #8 on: May 25, 2007, 05:46:01 PM »

Thanks! I just recently found locate32 and finding out I can integrate it with FARR is a great finding!
Logged
lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: July 04, 2007, 12:53:16 AM »

justice, i modified this alias to include the file-type as part of search query.. tks for the ideas.. smiley

Alias Tab


here's the preformatted version:
[copy or print]
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]*)

Farr window



edit: to include the Farr window.
« Last Edit: July 04, 2007, 12:57:34 AM by lanux128 » Logged

justice
Supporting Member
**
Posts: 1,888



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: July 04, 2007, 01:27:03 AM »

o nice work. this is one of my most frequently used aliases!
Logged

jmj
Charter Member
***
Posts: 42


Author of Locate32

View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: July 05, 2007, 04:03:59 AM »

Farr window

edit: to include the Farr window.


I haven't use farr, but does that means that farr uses locate to search files and shows results in its own window? If that's so, it's quite impressive.
Logged
justice
Supporting Member
**
Posts: 1,888



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: July 05, 2007, 05:18:40 AM »

No jmj it doesn't unfortunately. That would require a plugin request it here. Would love to see that done though.

At the moment it launches locate with the query, so you get a locate32 window with the result from your farr query.
Logged

jmj
Charter Member
***
Posts: 42


Author of Locate32

View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: July 05, 2007, 06:04:14 AM »

No jmj it doesn't unfortunately. That would require a plugin request it here. Would love to see that done though.


Ok. Mouser has asked me about the database structure in Locate (I'm the author of Locate). So maybe that plugin is available someday.
Logged
mouser
First Author
Administrator
*****
Posts: 33,286



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: July 05, 2007, 07:13:56 AM »

jim has been really generous with his code, and it's the first thing i'm going to study when it comes time to add optional indexing support to FARR  thumbs up

(see also my reply here: http://www.donationcoder....ic=8071.msg67072#msg67072)
Logged
lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: July 05, 2007, 09:36:58 PM »

since justice sold me the idea of converging farr & locate, i'm all for it.. it looks like the indexing is the next step forward.. Thmbsup
Logged

lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: August 27, 2007, 11:54:41 PM »

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.. smiley

here is the alias:
[copy or print]
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]*)

Logged

mouser
First Author
Administrator
*****
Posts: 33,286



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: September 22, 2007, 08:51:00 PM »

anyone who has been hoping for better farr interaction with locate needs look no further.  someone has just made a proper locate plugin for farr that is quite extraordinary and works wonderfully.

the really amazing thing on top of it's functionality is that the plugin was written in Delphi -- which is no small feat since all of the supporting helper code i wrote for farr plugin api was in c++, so he had to recreate a bunch of stuff in delphi. 

very impressive but the real sweet icing on the cake is that now anyone who wants to can use delphi to make a farr v2 plugin by starting with his skeleton code and just customizing a couple of functions.

i can't wait till he posts it  Thmbsup Thmbsup Thmbsup Thmbsup Thmbsup
Logged
lanux128
Global Moderator
*****
Posts: 6,088



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: September 22, 2007, 09:27:13 PM »

this is fantastic news.. Thmbsup i, for one will be awaiting this release eagerly.. smiley
Logged

Armando
Charter Member
***
Posts: 2,674



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #19 on: September 22, 2007, 10:16:02 PM »

This is great!!! And I wonder who this "someone" is...
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Armando
Charter Member
***
Posts: 2,674



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #20 on: September 22, 2007, 10:23:10 PM »

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.. smiley

here is the alias:
[copy or print]
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)

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???
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Darwin
Charter Member
***
Posts: 6,979



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: September 22, 2007, 10:45:55 PM »

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

"Some people have a way with words, other people,... oh... have not way" - Steve Martin
Okke
Supporting Member
**
Posts: 26



View Profile Give some DonationCredits to this forum member
« Reply #22 on: September 23, 2007, 02:35:22 AM »

Lol Armando, love the "head in the bag" icon. It actually almost looks like me Wink

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 smiley

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

Regards,

Okke
Logged
Okke
Supporting Member
**
Posts: 26



View Profile Give some DonationCredits to this forum member
« Reply #23 on: September 23, 2007, 03:26:15 AM »

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 smiley. 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!
Logged
TucknDar
Charter Member
***
Posts: 1,094


Advanced coder of Nowt

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: September 23, 2007, 04:45:36 AM »

Excellent news, Okke! And welcome to DC smiley

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. thumbs 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.
Logged
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.062s | Server load: 0.1 ]