DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: [FARR tip]  (Read 5,172 times)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 560
[FARR tip]
« on: July 18, 2007, 05:22 PM »
i wanted to share a trick with the community  :D

the following "clipboard" alias :
Code
^clip$
Code
$$c | restartsearch $$c

will "paste" the clipboard content to the search box (I know you can Ctrl+V to paste the clipboard content :huh:)

sounds dumb ... but it is in fact really handy when used in conjunction with aliases with powerful regex masks :

for instance this one which recognize urls...
Code

^(https?://)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6})(:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$
you can have one that recognize email, telephone, etc.

now let's say you choose the "auto copy selected text to clipboard on trigger" option in the general tab of FARR

you can just select a url (for instance) ... open FARR ... find the "clipboard" alias press enter then the url alias is triggered  :D
my "url" alias offers me different things : open the url in my default browser, in firefox, in opera, save the url to my delicious account and more to come...

if you assign an hotkey to this "clipboard alias" :
  • you select some text (url, email, etc.)
  • press the hotkey
  • press enter (to bad we can't skip that step)
  • one of your aliases with powerful regex masks is triggered

hope it gives you some ideas

Cheers, Nitrix
« Last Edit: July 18, 2007, 05:32 PM by nitrix-ud »

TucknDar

  • Advanced coder of Nowt
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
Re: [FARR tip]
« Reply #1 on: July 23, 2007, 10:15 AM »
sounds cool! Care to provide a downloadable alias (yes, I know how to copy'n'paste...)?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: [FARR tip]
« Reply #2 on: July 23, 2007, 10:20 AM »
you can now do this without the need for nitrix clever trick, and solve the need to hit enter as well, by simply creating a hotkey with set searchtext of: %cliptext%

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 560
Re: [FARR tip]
« Reply #3 on: July 23, 2007, 11:21 AM »
Quote
you can now do this without the need for nitrix clever trick, and solve the need to hit enter as well, by simply creating a hotkey with set searchtext of: %cliptext%
very true

but the trick still holds if you want to build some "structured" aliases
i personnaly use it as the first result for my generic "clipboard" alias... named "c" which offers me different other aliases to choose from

so i invoke FARR with the "c" alias thanks to the new hotkey system...
if a press enter it replaces "c " in the search box by the clipboard content
handy if you don't want to have to many hotkeys...

i personnaly have two :
one to invoke FARR
one to invoke FARR with my "c" alias (and selected text copied to the clipboard)

Original address: https://www.donationcoder.com/forum/index.php?topic=9267.0