Welcome Guest.   Make a donation to an author on the site November 25, 2014, 07:28:49 PM  *

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]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FARR v2 Tricks and Tips Clinic  (Read 8912 times)
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: June 06, 2007, 10:41:37 AM »

I thought i'd start a little thread for FARR tricks+tips on some of the more unusual stuff in FARR v2.

I'll start with a trick that demonstrates the "dosearch" special alias action.  Although described in the help file its not obvious how you might use this special action.  Here's one way.

You know that FARR2 can do direct browsing of folders, etc.
So you could type "C:\Program Files\Microsoft\..." etc.

Here's an alias that will let you type "pf\" instead of "C:\Program Files\" as a shorthand:

[copy or print]
1000>>>pf alias search>->dosearch C:\Program Files\$$1>+>^pf\\(.*)$

just select that code and go to your alias file and choose IMPORT menu.

basically it just says that on matching regular expression "^pf\\(.*)$"
treat that as if user typed "C:\Program Files\$$1"

so the dosearch alias action is a way of letting the user type one thing, and making the program think they typed another.
Logged
JennyB
Supporting Member
**
Posts: 209


Test all things - hold fast to what is good

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #1 on: June 08, 2007, 05:20:53 AM »

I thought i'd start a little thread for FARR tricks+tips on some of the more unusual stuff in FARR v2.

I'll start with a trick that demonstrates the "dosearch" special alias action.  Although described in the help file its not obvious how you might use this special action.  Here's one way.

You know that FARR2 can do direct browsing of folders, etc.
So you could type "C:\Program Files\Microsoft\..." etc.

Here's an alias that will let you type "pf\" instead of "C:\Program Files\" as a shorthand:

[copy or print]
1000>>>pf alias search>->dosearch C:\Program Files\$$1>+>^pf\\(.*)$

just select that code and go to your alias file and choose IMPORT menu.

basically it just says that on matching regular expression "^pf\\(.*)$"
treat that as if user typed "C:\Program Files\$$1"

so the dosearch alias action is a way of letting the user type one thing, and making the program think they typed another.

I can sortof follow that, but could you back up a bit and recommend a simple reference to regexes as used in Farr for people who are not used to working with them? How does the line of code relate to what you would put in the text boxes if you were defining the aliases yourself?

I'd like to see aliases working more like folders: if you select an alias that takes parameters it presents in the results window a list of those parameters that you have already used. Further typing filters the list as if it were a file list, and you can select-and-launch, or launch with the parameter you have just typed in.
Logged

If you don't see how it can fail -
you haven't understood it properly.
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: June 08, 2007, 06:35:05 AM »

Quote
How does the line of code relate to what you would put in the text boxes if you were defining the aliases yourself?
here's the screenshot:



Quote
could you back up a bit and recommend a simple reference to regexes as used in Farr for people who are not used to working with them?
http://www.regular-expressions.info/

Logged
cnewtonne
Honorary Member
**
Posts: 115

View Profile Give some DonationCredits to this forum member
« Reply #3 on: June 08, 2007, 02:12:34 PM »

this should be similar to having an folder alias 'pf' and then typing '+pf \\ microsoft'
right?
Logged
mouser
First Author
Administrator
*****
Posts: 33,699



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

no, whats special about using the dosearch action is that it is live as you type.  try it and see.
Logged
JennyB
Supporting Member
**
Posts: 209


Test all things - hold fast to what is good

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: June 08, 2007, 03:51:32 PM »

Quote
How does the line of code relate to what you would put in the text boxes if you were defining the aliases yourself?
here's the screenshot:

Thanks, that clears things up a bit. I've just checked the "display preformatted aliases for copying" function on "Import and Export"

One entry per line
>>> starts group alias name
>-> starts Result(s)
>n> starts new line in results
>+> starts regular expression pattern

What do you use for Result Filter or Hotkey shold you need to specify them?



Quote
Quote
could you back up a bit and recommend a simple reference to regexes as used in Farr for people who are not used to working with them?
http://www.regular-expressions.info/

Thanks. Very useful!  Thmbsup
Logged

If you don't see how it can fail -
you haven't understood it properly.
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: June 08, 2007, 06:26:04 PM »

im going to change the import and export format to use xml like the new alias files use, so this import and export format may not be very important to remember, but you can see the hotkey and result filter format simply by "exporting" an alias with those things.

basically its:

SCORE>>>NAME>->RESULTS>+>REGULAREXPRESSION>/>HOTKEYNUMBER>#>REGEXRESULTFILTER
Logged
cthorpe
Discount Coordinator
Supporting Member
**
Posts: 719


c++thorpe

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: June 09, 2007, 12:37:31 AM »

I have two program files locations.  One is at C:\Program Files and the other is at D:\Program Files.  Would it be possible to have the pf alias search both locations?

Carl
Logged
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: June 09, 2007, 12:41:22 AM »

to "search" in those places, you could add both directories to the search directories tab, and add the "pf" modifier to both.

then if you wanted to search in both places for a file you would do:
"+pf filename"

the dosearch alias example above is for directory BROWSING, not for normal searching (so no you cant combine both folders since its really browsing the directories).
Logged
JennyB
Supporting Member
**
Posts: 209


Test all things - hold fast to what is good

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #9 on: June 09, 2007, 01:30:40 AM »

im going to change the import and export format to use xml like the new alias files use, so this import and export format may not be very important to remember, but you can see the hotkey and result filter format simply by "exporting" an alias with those things.

basically its:

SCORE>>>NAME>->RESULTS>+>REGULAREXPRESSION>/>HOTKEYNUMBER>#>REGEXRESULTFILTER

<slaps head>
Thanks mouser, I've been out of the testing loop for a while, revising for final BSc exams. The download link seems to have changed - can you send me the new one?

Logged

If you don't see how it can fail -
you haven't understood it properly.
cnewtonne
Honorary Member
**
Posts: 115

View Profile Give some DonationCredits to this forum member
« Reply #10 on: June 09, 2007, 09:01:15 AM »

Mouser, I can not understand this behavior ...
I have created 2 search templates here...

lab --> ^lab\\(.*)$ --> c:\lab\$$1
pf --> ^pf\\(.*)$ --> c:\program files\$$1

now, typing lab\exe shows all executable files in c:\lab but NOT anything beyond that level. However, typing pf\exe shows executables in main folder and ALL subdirs recursively.

To show all exec's recursively in lab I have to type 'lab\*\exe'.

Why is it different?
Logged
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: June 09, 2007, 09:14:27 AM »

Quote
However, typing pf\exe shows executables in main folder and ALL subdirs recursively
are you sure this is true -- or is it the case that there are no exe matching entries in the main folder? my memory is that it works like this: IF matching files are found in the exact directory you specify, then its not going to go into subfolders.  only when you tell it to show you exe matching files in some explicit directory and it doesnt find any will it then try to help you out by searching deeper.

you could of course add the \*\ into your aliases to always look as deep as it can.
Logged
cnewtonne
Honorary Member
**
Posts: 115

View Profile Give some DonationCredits to this forum member
« Reply #12 on: June 09, 2007, 09:23:22 AM »

This makes sense because it did this recursive find on 2 of my dirs out of 5. When I checked them, none contained the exe I told it to find so it went ahead and continued downwards in the tree. I could not understand why is it behaving differently across dirs. For now, I wanted it to be a greedy as possible by adding \*\ and it works consistently now.

One last question, though, adding '\*\' to my search template now will make these 2 search strings return same results...

lab\exe
+lab exe +sall

The template simply and implicitly did the '+sall' for me. Right?
Logged
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: June 09, 2007, 09:41:24 AM »

there is a difference. +sall should show all, without it, it will still show a lot due to the new ability to specify a larger # of results when directory browsing (see options). i think.
Logged
urlwolf
Charter Member
***
Posts: 1,784



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #14 on: June 29, 2007, 05:26:07 AM »

selecting the create a new alias file option makes FARR dies with an access violation error. Sad v. 2.00.116 here.
Logged
rjbull
Charter Member
***
Posts: 2,788

View Profile Give some DonationCredits to this forum member
« Reply #15 on: June 29, 2007, 05:53:43 AM »

selecting the create a new alias file option makes FARR dies with an access violation error. Sad v. 2.00.116 here.

Same here with v.2.00.108 on Windows XP [Version 5.1.2600]:

---------------------------
Find and Run Robot
---------------------------
Access violation at address 00571080 in module 'FindAndRunRobot.exe'. Read of address 40508902.
---------------------------

Logged
edbro
Charter Member
***
Posts: 425

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #16 on: June 30, 2007, 02:03:54 PM »

Not really a FAR trick but just a tip. For OneNote users (and Evernote), you can create hyperlinks to individual pages. For some of my most used notes I use those hyperlinks to create shortcuts which I place in a folder searched by FAR. Now I can go directly to an individual note in OneNote.
Logged
mouser
First Author
Administrator
*****
Posts: 33,699



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

The new alias file crash has been fixed in latest version, thanks for the bugreports.
Logged
hamradio
Charter Honorary Member
***
Posts: 601



Amateur Radio Guy

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

You can use restartsearch in conjunction with another alias to have recursive aliases...

Ex. You have two aliases named this and that.

So you create another group alias (we will say test for this example) and name it what you want...then you add the following for the results to show...

this | restartsearch this
that | restartsearch that

Now when you type test it will allow you to pick from those 2 aliases.

Enjoy!  smiley
Logged

Carroll - HamRadioUSA
mouser
First Author
Administrator
*****
Posts: 33,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: June 30, 2007, 09:49:41 PM »

It's a little hard to see how this would be useful until you see it in action in ham's plugin.. basically it let's you simulate hierarchical menus of aliases.
Logged
Pages: [1]   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.041s | Server load: 0.02 ]