Welcome Guest.   Make a donation to an author on the site October 31, 2014, 01:02:29 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.
 
View the new Member Awards and Badges page.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FARR v2 PLUGIN CREATOR (SDK/API) INFO THREAD  (Read 22908 times)
mouser
First Author
Administrator
*****
Posts: 33,613



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: September 23, 2007, 10:26:51 AM »

This thread will collect info and links for FARR v2 plugin writers:



Latest News:
  • The plugin SDK pack was updated with sample DELPHI plugin framework (Sep 23, 2007) -- thanks to Okke.
  • New plugin wrapper for C# by vitalyb can be found: here.
  • An amazing plugin wrapper for Javascript and other Active Scripting Languages by dc member ecaradec: here - AMAZING
« Last Edit: May 06, 2008, 07:58:02 PM by mouser » Logged
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 #1 on: September 23, 2007, 10:30:20 AM »

Great! This should spur development of more plug-ins. I took a look recently at writing a plug-in and quickly realised that I was way out of my element depth. When I have time, I'll take a look at all of these resources and will take another crack at it  Thmbsup
« Last Edit: September 23, 2007, 10:43:18 AM by Darwin » 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 #2 on: September 26, 2007, 08:48:30 AM »

I’m still working on the locate32 plugin and nitrix had some great ideas on how to use it.
Now I’m running into some problems.

What I tried to do:

-   used the regex “loc”
-   make an alias that does the following:
dosearch loc –p d:\music –ld $$1 +open_winamp

Why this doesn’t work:

FARR doesn’t seem to recognize the +open_winamp option when a regular expression is used.


What I tried to do next:
-   create an alias for the plugin named “locate”
-   make an alias that does the following:
dosearch locate –p d:\music –ld $$1 +open_winamp


Why this doesn’t work:

When using an alias and using the searchstring_lc_nokeywords parameter the options like “-p” and “-ld” get stripped too. So I can’t use that searchstring. It would also be really hard to distinguish minusoptions (for instance –mp3) that belong to FARR or belong to locate.


What I tried to do next:

Instead of having the locate alias use “-p” for directories and “-ld” for directories only, I filtered out the “+” options in the plugin so I can use the FARR searchfolders like “+folder_music” and options for directories only like “+\”. I open the FindAndRunRobot.ini and read the SearchFolders section to do that (Mouser, is there a way to question SearchFolders from inside the plugin?).

The options get translated back to the regular “-p” and “-ld” options and it loops through the matched directories and adds those files found to the results. Btw, people might say I could just return the results to FARR and let it do all the filtering in case of “+folder_music” but the problem is locate would just return ALL the results at first which is basically your whole harddisk smiley.

This is working sofar but I’m running into one more problem. When I return the results I tell FARR to add a score to the files (also tried telling FARR to do matching after returning results as well). It does add a score but it totally seems to ignore pattern scoring. If I do “locate +folder_music +mp3 <artistname>” then locate returns the results but the “+mp3” pattern scoring doesn’t add the score to mp3 files. If I do “+folder_music +mp3 <artistname>” it does add the scoring. Does the pattern scoring work with aliases/plugins at all? I would expect FARR to apply the + modifiers to the result. In case of “+folder_music” and “+mp3” I’d expect all the results to match the first modifier and add the score to mp3 files that are found.

I could read the pattern scoring from the ini file as well but I’d rather not if it’s not needed. It would be great if I could just pass the results back and let FARR take care of the rest.

Mouser, do you have any ideas/solutions? Or anybody else ofcourse smiley
Logged
nitrix-ud
Charter Member
***
Posts: 482

View Profile Give some DonationCredits to this forum member
« Reply #3 on: September 26, 2007, 09:48:30 AM »

[copy or print]
dosearch locate –p d:\music –ld $$1 +open_winamp

this is really hard to distinguish plugin parameters from FARR parameters...
this is also true for any other use of the dosearch command... application, alias, url

i feel that those parameters should be better separated maybe directly into the dosearch command :
[copy or print]
dosearch locate –p d:\music –ld $$1 [FARR]+open_winamp[/FARR]
or
[copy or print]
music search | dosearch locate –p d:\music –ld $$1 | +open_winamp

just my 2 cents cheesy
Logged
mouser
First Author
Administrator
*****
Posts: 33,613



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: September 26, 2007, 10:07:46 AM »

Okke,
these are great questions and points, just give me a day to get to them..

you've basically identified the crux of the problem, which is that on one hand the regex match blocks farr from stripping off and parsing the modifier options, and on the other hand if you don't use regex then all such modifiers and - arguments are stripped off.

one solution is to add a few options in aliases that let you tell farr what kinds of modifiers to strip off (-modifier and/or +modifiers), even before a regular expression match.

another solution might be in a non-regular expression match to let a plugin more easily examine the modifiers and tell farr which ones the plugin handled so farr doesn't have to.


Logged
nitrix-ud
Charter Member
***
Posts: 482

View Profile Give some DonationCredits to this forum member
« Reply #5 on: September 26, 2007, 10:31:53 AM »

Mouser, do you even read my posts ?
Logged
mouser
First Author
Administrator
*****
Posts: 33,613



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: September 26, 2007, 10:48:21 AM »

i replied to Okke's before i saw yours..

nitrix your idea is not a bad one at all, especially in the case of using the dosearch command.  in fact it would be pretty easy to add support for this with the dosearch command, which is a good idea and i should probably do anyway.

however it's not an ideal situation for when you want users to be able to manually specify modifiers, and some aliases may want to handle them differently than others.
Logged
Okke
Supporting Member
**
Posts: 26



View Profile Give some DonationCredits to this forum member
« Reply #7 on: September 26, 2007, 10:57:41 AM »

@nitrix: lol, think Mouser has his nitrix filter turned on still Wink

No problem Mouser, take your time.

Just to summarize the possibilities that would be really nice to have:

- make it very easy to distinguish between FARR specific options and program parameters
- be able to handle the modifiers with plugins, all of them or partially which means "+folder_music" could be handled by the plugin for instance, "+mp3" scoring by FARR
- maybe even the ability to let the plugin change the modifiers that are used? (would probably be more complicated)
- let the plugin have access to all the FARR options. Specifically the SearchFolders, Pattern Scoring and such
(less of a priority since I can easily load %APPDATA%\DonationCoder\FindAndRunRobot\FindAndRunRobot.ini and get the values from there if needed)
- being able to use modifiers on alias/plugin results. (For instance use locate to return a subset of 500 files which FARR filters afterwards with "+folder_music")

There are also some options in the plugin framework I'm clueless about when to use them and what they do precisely. Trying as much as possible with
trial and error to figure things out but I'll probably get stuck on some items smiley

In the meantime I'll just try and find some workarounds.
Logged
nitrix-ud
Charter Member
***
Posts: 482

View Profile Give some DonationCredits to this forum member
« Reply #8 on: September 26, 2007, 11:54:22 AM »

 cheesy i was afraid you had me filtered out !

[copy or print]
nitrix your idea is not a bad one at all, especially in the case of using the dosearch command.  in fact it would be pretty easy to add support for this with the dosearch command, which is a good idea and i should probably do anyway.

however it's not an ideal situation for when you want users to be able to manually specify modifiers, and some aliases may want to handle them differently than others.

it is true that when using dosearch, nobody will really care about the length of what you type... which is a different story when using the search box directly...
i suggested not so long ago a second box next to the search box which would be the parameters box

using "dosearch" FARR parameters (+action, \STAYOPEN, etc.) would be clearly identified
and when using FARR search box, you would just tab (if tab autocomplete is unchecked) to go to the FARR parameters box ... (or click into the box) no need for "+" or anything else
one could imagine that there would be some kind of autocompletion like gmail (no need to remember the name of the modifiers... and much faster)

one other suggestion i already did was to better identify "folder modifier" from "action modifier", this is because it's pretty easy to run into problems...
for example if you give the same name to an action and an alias
or if you give the same name to an action and to a folder modifier...

i know that "+" is short and nice (though i do not like it... it is not direct on a laptop), but there are maybe other alternatives...
 
Keep up the good work, i guess there are just too much those days Wink
Cheers, Nitrix


PS: oups, i forgot, it would be really really nice if one non-programmer like me could access as much information as possible to use it in a autohotkey script...
would it be hard to put informations into a standard window edit box, all those information presented one after another ??

[copy or print]
searchbox = my search
resultlist = result1,result2,result3
statusbox = statusbox  text
lastactivewindow = ...
etc.

as an example, i would love to have those information to be able to build a preview window for many of my aliases and in particular for my code snippet alias
you search for code snippet, autohotkey is triggered by the search box content (in my example : s keyword)
you select a result, autohotkey loads the content of the file... into a nice semi-transparent window... awesome  Grin
« Last Edit: September 26, 2007, 11:58:52 AM by nitrix-ud » Logged
mouser
First Author
Administrator
*****
Posts: 33,613



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

Updated info with link to vitalyb's C# plugin code.
Logged
mouser
First Author
Administrator
*****
Posts: 33,613



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

The latest FARR release (2.04.02) has added some new functions for plugins writers that have not been used yet in currently downloadable examples.  As soon as I finish adding a few more functions for the new htmlview in conjunction with plugin writers i will update the sdk documentation and examples.
Logged
mouser
First Author
Administrator
*****
Posts: 33,613



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: June 13, 2008, 05:59:12 PM »

Plugin writing tip:
To force FARR into showing all results for your plugin call: set_strval("setshowallmode","");
Logged
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: July 21, 2008, 03:07:01 PM »

The latest FARR release (2.04.02) has added some new functions for plugins writers that have not been used yet in currently downloadable examples.  As soon as I finish adding a few more functions for the new htmlview in conjunction with plugin writers i will update the sdk documentation and examples.
Any news on updating the SDK samples / documentation?
Logged

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



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: July 21, 2008, 03:18:37 PM »

Meant to do it this weekend -- i'll do it tonight or tomorrow at the latest.
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.046s | Server load: 0.09 ]