Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 05:56:27 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)  (Read 4307 times)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
There is a brand new (and major IMHO) feature in the last FARR release... that is : #filecontents

it allows you to "externalize" aliases... here is how :

1) let's take one of my favorite alias the "g" search, i use it to search google in various ways, yahoo, look up words, etc.
here it is in action :
farr.png[tiny-tutorial] how to use #filecontents ? (new Major FARR feature)

2) here is the alias in the options dialog:
options_before.png[tiny-tutorial] how to use #filecontents ? (new Major FARR feature)

3) instead of putting the results right inside the alias edit dialog use the new #filecontents command :
f | #filecontents C:\_Garbha\Program Files\_FarrAliases\g.txt
Please note that the part before the actual #filecontents is needed, otherwise this does not work (the "|" seems to be needed at present)
options_after.png[tiny-tutorial] how to use #filecontents ? (new Major FARR feature)

where g.txt now contain the result list that was previously in alias edit dialog
file_to_be_dumped.png[tiny-tutorial] how to use #filecontents ? (new Major FARR feature)

done !


so why is it such a great feature ?
i will give you three reasons :

1) it is as fast as an internal alias

2) it is much easier to edit an "externalized" alias
you can use your favorite editor... full screen... on a secondary monitor...
and see the results in FARR in REAL-TIME
believe me it is a real improvement

3) you can share your aliases with much more ease...
once you've set up the alias... you basically have to copy and paste a file

even better, if you use Windows Live Sync/Foldershare (or dropbox ?) you can share modifications you've made in real-time with no intervention whatsoever
(once you've set the folder containing the files to be dumped to be synchronized...)
how is that ?  ;)

Once again mouser, you made my year with this new feature...
keep up the good work

« Last Edit: March 03, 2009, 02:21:23 AM by nitrix-ud »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)
« Reply #1 on: March 03, 2009, 03:33:46 AM »
a good tutorial on the feature. i picked up a few pointers as well.. :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)
« Reply #2 on: March 03, 2009, 03:36:52 AM »
Thanks for the tutorial  ;D

I wonder if there is anything interesting that could be done by:

  • Set up an alias using #filecontents pointing to some file (call it A)
  • Use a plugin to generate the content of a temporary file -- eventually to replace A
  • When the temporary file construction is complete, move / copy it over A

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)
« Reply #3 on: March 03, 2009, 08:28:06 AM »
@ewemoa

that would be indeed very interesting

and what about the following ?
 
  • Set up an alias using #filecontents pointing to some file (call it A)
  • Use a plugin to execute a file (exe, lnk, ahk, whatever...) which create a temporary file (that way people can create the file using autohotkey or any other software)
  • When the temporary file construction is complete, move / copy it over A

or this one :


even better (mouser's idea) what if the plugin could add suffix and prefix when executing the result
let's say the mycontactlist.php returns :
John Smith
Bob Brown
Steve McEnroe
etc.

let's say the suffix would be :
http://http://www.my...com/search.php?name=

then you could create an alias to query a contact list online and then open the resulting page in your browser... awesome

suffix and prefix support would be really awesome

could be to search php functions...
juste have a list with all php functions
then have the following suffix :
http://www.php.net/

 :D

hope someone will do it some day !!!




ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)
« Reply #4 on: March 04, 2009, 06:06:33 AM »
Considering the plugin ideas, the timing of the triggering of the mechanism for generating the content of the #filecontents file is unclear for me -- doing it each time the alias is about to be used seems potentially problematic.  Depending on the case, a periodic execution might be sufficient but I'm hazy on this.

I'm not so clear on the benefits of having a network version of #filecontents if one of the earlier plugin ideas of using an external script or some code are implemented.  Similarly for the suffix and prefix support -- these also seem doable via one of the earlier plugin ideas.

On a side note, have you tried:

  http://www.donationc...ex.php?topic=15904.0

for searching php functions? ;)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)
« Reply #5 on: March 04, 2009, 08:00:46 AM »
Quote
On a side note, have you tried:
for searching php functions?

nope, but i should...  :Thmbsup:
however, the idea behind my php functions search is to search among existing functions... not just search php.net site : www.php.net/%keyword%

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: [tiny-tutorial] how to use #filecontents ? (new Major FARR feature)
« Reply #6 on: March 04, 2009, 08:34:51 AM »
To continue the OT bit a bit...

Well, FWIW, the second result for me when I type:

sg php

is:

PHP Function Lookup - $2

Does that do it for you?