topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 5:30 am
  • Proudly celebrating 15+ 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: FARR Plugin SDK 1.0 Released - Make a FARR plugin DLL - if you dare  (Read 10944 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Ok the new downloads of FARR v2 now have the plugin SDK included (installed in FARR directory).  So programmers please do grab the FARR v2 alpha release and get to work!! (email me [email protected] for private link to FARR alpha download if you don't have it yet).

It's sorely lacking in documentation, but it does include full source code for the FarrFox plugin, plus sample projects for dev-c++ and visual studio.  However you should be prepared for some frustration as you try to figure out how to get it to all work right.. I'm here to help though.

If you do not intend to write your plugin in C++ your job is going to be 1000x more painful, since i've provided helper code for C++ but not for anything else.  I'm happy to add more features, so plugin coders feel free to request more abilities.

ps.
I will be giving out some DC Mugs to the first few real FARR plugins, and i'll be announcing a contest for best FARR plugins with some better prizes soon :)
« Last Edit: April 20, 2007, 11:33 PM by mouser »

TucknDar

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,133
    • View Profile
    • Donate to Member
Oh, no... now I need to come up with an idea for a FARR plugin AND learn to code :'(

jk, I can't wait to see some cool plugins born :)

Ruffnekk

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 332
  • Uhm yeah...
    • View Profile
    • RuffNekk's Crypto Pages
    • Donate to Member
Excellent!!  ;D I was waiting for this every day  :Thmbsup:
Regards,
RuffNekk

Programming is an art form that fights back.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Here's the ReadMe from the download:

//---------------------------------------------------------------------------
Find and Run Robot (FARR) v2 Plugin SDK Documentation
https://www.donation...r/findrun/index.html
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
Documentation v1.0 - Apr 5, 2007 - [email protected]
//---------------------------------------------------------------------------


//---------------------------------------------------------------------------
This document explains some basic information on how to program plugins for
 the Find and Run Robot 2 tool for MS Windows.
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
WARNING

Please keep in mind that the plugin support for FARR is brand new as of
 April 2007, and is still just in preliminary stages.  While it is working,
 you should expect changes, bugfixes, and lackluster documentation until
 things develop further.
Should you choose to continue developing a plugin for FARR at this early
 stage, expect frustration and heartache, but lots of support from the author.
 If there are features i can add to help you, just let me know.
 -mouser ([email protected])
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
OVERVIEW - What can you do with FARR plugins?

The basic things you can do with a FARR plugin are:

1. Present standard file/url results to the user based on what they type.

 For example, the farrfox plugin that is included in the SDK shows how
 to make a plugin that loads all firefox, opera, and IE bookmarks and
 let's the user search them.  In this case, FARR's built in keyword filtering
 is used to filter and sort and score the results, the plugin's job is
 simply to return all possible matches.  If you prefer you can do the filtering
 and scoring yourself.  You can provide custom descriptions and icons for
 results.


2. Take over the launching of results.

 Normally, FARR knows how to launch file results and URLs, but if you wish,
 your plugin can takeover launching of all or some results.  Using this
 functionality you can present arbitrary result lists which have whatever
 meaning you want (not files or urls), and then decide how to react when
 user selects from your list.  (Note FARR already has builtin funcionts to
 copy stuff to clipboard or to the last window open before FARR was
 triggered).


3. Replace the output window with richedit text.

 This is sort of unusual, but you can choose to tell FARR to replace the
 normal results with a long richtext (or plaintext) string.  This might be
 useful if you wanted to show the user some help text or other text.  Right
 now this text is readonly and nothing the user types gets sent back to the
 plugin, but we could change this if coders want to do something more fancy.
 Adding support to display HTML and react to it.


4. Adjusting item scores

 This is less useful than you might think because it can slow down searching
 significantly, but this allows you to simply modify the scores returned
 by normal FARR or other plugins, or reject them, etc.


5. Show or Hide the FARR window.

 This is useful if you want to take over triggering of FARR.
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
FUTURE POSSIBILITIES

1. Display any windows controls in the output

 I think a good solution to having real flexibility is to allow the coder
 to display any windows control in the output window (via activex or simply
 by setting parent hwnd).  In this way you could really display any info.


2. Custom grid output

 Short of taking over the output completely, plugins will soon be able to
 ask FARR to display a table/grid of info with custom column header info.


3. Add custom info to files

 You will soon be able to add info to results.  This would be useful for
 doing things like adding mp3 tag info to the display of mp3 files.
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
WHAT DO I NEED TO MAKE A PLUGIN?

1. A FARR plugin is a DLL, and you should be able to make a plugin in any
 language that can create windows DLLs.

2. All of the official samples are made in C++ (youll find samples for
 dev-c++, ms visual c++, and borland c++ builder which is what the advanced
 farrfox plugin is made in).  But you should be able to use any language
 that can create DLLs.

3. Making your plugin in C++ will be much easier curently just because
 i've already written a lot of helper code your c++ plugins.  If you are
 writing a plugin in a language other than c++ then you are going to have
 to study the C++ helper code in the Source directory to get a better idea
 of what you have to do.
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
OK TEACH ME HOW TO MAKE A PLUGIN!

1. I have now yet written good documentation on how to code plugins. Sorry!!
 I will try to add real walkthrough and documentation later.

2. But I have tried to thoroughly document the c++ helper files and the
 simple sample plugins.  Please use those samples as your guide to
 make a new plugin.  The C++ Builder FARRFOX plugin is a full plugin which
 will show you lots of tricks.

3. Feel free to email me at [email protected] or find me on
 irc (#donationcoder on efnet) for more help.

4. If anyone feels like making a walkthrough for plugin construction I
 would be delighted to host it, and ditto for other language plugin code.
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
HOW DO I DEPLOY/TEST MY PLUGIN?

1. Just make a subdirectory for your plugin, and place the dll and any custom
 icon for it in that subdirectory (see the myplugin.cpp file for how to
 specify the info for your plugin and its icon file).

2. Then just copy that subdirectory into your FARR Plugins/ subdirectory and
 restart FARR (or go to plugin options to rescan for new plugins).
//---------------------------------------------------------------------------

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Hamradio has made some badges, that will be added under your name and in your profil if you write a plugin for any DC software (including FARR):

dcp_badge_plugin_writer.png dcp_badge_plugin_writer_tiny.png

DC Mugs+Badges.. gotta catch 'em all!

taichimaster

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 160
    • View Profile
    • Donate to Member
Proud to be the First FARR Plugin Developer!!!!  This plugin is very simple and does not do much actually.  It searches your network connections and invoke its default verb upon triggering.  It took me about 2-3 hours to write it.  With this "proof of concept" plugin under my belt, hopefully I can move up to something more challenging.  I have to deal with VPN and PPPoA connections a lot at work, so this might actually useful for my personal use  :up:

Technical Note:
Initially I had problems with the "Status" verb which I traced it down to a windows shell bug where the "Status" verb cannot be invoked by any process other than "explorer.exe" (see HERE>:(.  So for those PIDLs which have default verbs as "Status", I switched them to invoke "Properties" instead.  Normal RAS entries (VPN and dialup) and "New connection wizards" work fine though. 

Extract and put under the FARR plugin directory.

Type "nwconn $$$1" to search.

nwconn.png

Mouser, you did a great job on the Plugin SDK, thanks.  Can't wait to see the custom context menu and grid output support (with custom columns and stuff).  Docs could really use some improvement too.  Oh btw, you can now give me those beautiful badges and mug :)
« Last Edit: April 08, 2007, 06:10 AM by taichimaster »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Wonderfull !!!  :up: :up: :up: :up: :up: :up: :up: :up: :up: :up:

ps. you can customize the value to be filled in for "Location" (and i should make the "Type" column customizable too).
« Last Edit: April 08, 2007, 07:29 AM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Btw, nwconn works great  :-* :-* :-* :-* :-*

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
The FARR plugin writing contest will begin soon.
Prizes will include Borland C++ Builder Turbo edition, VmWare, and a custom cody mug:

Mug (designed by nudone):
pdmug1.png
126877312v4_150x150_Back.jpg

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
What the mug! I'll send you a mail ASAP!
« Last Edit: April 23, 2007, 07:04 AM by Lashiec »