Welcome Guest.   Make a donation to an author on the site April 24, 2014, 12:57:11 AM  *

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.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2] 3 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: New FARR plugin : FSubScript enable loading of multiple javascript plugins  (Read 18697 times)
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #25 on: November 16, 2008, 02:06:03 PM »

by the way -- this fsubscript thing is SOOO clearly a huge step forward for FARR plugins.. i mean just look at the sample color script: it's 30 short simple lines long, and it's just a .js file and an icon, as simple as can be.  really really going to make plugin writing accessible to a whole new group of people  thumbs up thumbs up thumbs up
Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #26 on: November 16, 2008, 06:31:43 PM »

FSubScript deserves a web page of its own.
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #27 on: November 17, 2008, 12:15:01 AM »

For your question in the plugin about the settings : One way to create options is to send a autohotkey executable, however you can do it the way you like. You need to send a message WM_USER+1 to the window name FScript/FSubScript. Autohotkey program can do this. However an IE with a registered custom protocol could do it to. UI in javascript is a bit tricky. I think I like the autohotkey solution the more.

Wow, thanks for responding to a question I put in the plugin's source!

At the moment, it seems enough to just use FARR's User Variable support for configuring Akete, but perhaps as time goes on I'll change my mind about this smiley
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #28 on: November 17, 2008, 12:34:49 AM »

I improved the now renamed FSubScript.

As an exercise in reviewing plugin functionality, understanding FSubScript a bit better, and becoming more comfortable w/ gvim, I filled in more of the skeleton functions in fscript.js:


Don't know if they work, but perhaps it will save ecaradec some drudgery  Wink
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #29 on: November 17, 2008, 07:40:48 AM »

There might be bugs. There are centainly bugs.

Logged
mouser
First Author
Administrator
*****
Posts: 32,699



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

ewe, it's fantastic seeing such progress  thumbs up thumbs up
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #31 on: November 18, 2008, 02:00:47 AM »

ewemoa I've replaced my skeleton functions with those you did. Thanks.
The querynokeyword would probably a bit different from the farr one. I'll have to remove the whole "fssc +pluginAlias". If you do it I'll integrate it. Also the FARR querynokeyword seem broken : It always return the same thing as the queryraw.
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #32 on: November 18, 2008, 02:54:13 AM »

I've replaced my skeleton functions with those you did. Thanks.

Cool! I hope they work Wink

Quote
The querynokeyword would probably a bit different from the farr one. I'll have to remove the whole "fssc +pluginAlias". If you do it I'll integrate it.

In addition to what mouser mentioned earlier in this thread, he gave me some hints on the idea of being able to invoke FSubScript plugins w/o using "fssc +pluginAlias" syntax but rather "pluginAlias" syntax.  I am investigating this a bit and hope to report back with some results on this before too long.

Quote
Also the FARR querynokeyword seem broken : It always return the same thing as the queryraw.

I got the feeling querynokeyword seems broken too -- some of my querynokeyword-not-working experience is summarized at:

http://www.donationcoder....11804.msg136530#msg136530
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #33 on: November 18, 2008, 04:37:52 AM »

It's a first attempt, but attached, please find an experiment with FSubScript's fscript.js and colors' fsubscript.js.

The idea here is to provide the plain plugin invocation syntax of "name" rather than "fssc +name".

I'm probably missing some important things, but may be the code is worth something Wink


P.S. I have limited screen space so I've reformatted -- hope that isn't a problem.

* FSubScriptAndColorsExperimental-2008-11-18.zip (3.26 KB - downloaded 100 times.)
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #34 on: November 19, 2008, 05:14:56 AM »

Attached is a further refinement after discussion with mouser.  Check it out...or not  Wink

Some changes include:

Fubscript/fscript.js:
  • Stops searching if there is an exact match for a plugin
  • Defined more postprocessing options
  • Renamed ADDSCORE to ADD_SCORE

colors/fsubscript.js:
  • An additional color -- grey
  • Regular expression handling of sorts
  • In plugins["colors"].search(), emitResult() is called w/ different args -- see source for details

Both:
  • other things I forgot
  • likely more unknown bugs smiley

* FSubScriptAndColorsExperimental-2008-11-19.zip (3.47 KB - downloaded 119 times.)
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #35 on: November 19, 2008, 01:25:26 PM »

The stop search is a very good idea. I was painfully trying to have aliases without modifier. It just work now smiley and its much better.

I think we should consider this version official. Thank you a lot!
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #36 on: November 19, 2008, 01:54:45 PM »

I'm not sure how stopsearch work. What would occured if previous plugins generates results (plugins and subplugins ). Wouldn't there be some random results depending on order of execution ?
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
mouser
First Author
Administrator
*****
Posts: 32,699



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

basically the first plugin that matches will prevent others from generating results.  but thats the way all plugins work.

alternatively if you think some plugins want to generate results and not stop others from making results, you could have a per-plugin option to say whether to stop or not.
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #38 on: November 19, 2008, 04:06:53 PM »

I may be wrong but it seem that the plugin is now doing the filtering. Is there a way to keep FARR doing the filtering ? I would like to avoid burden plugins dev with the filtering except when they don't need it. That was the reason I used modifiers : they didn't affect the filtering.

Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #39 on: November 19, 2008, 04:26:02 PM »

ecaradec is right -- the plugins should not do the filtering -- farr can do a smarter job (or else farr should be fired!)

i think it just requires an extra function for me to write that the plugins can call.

Let me explain:

There are two ways that a plugin normall gets called:
1) either because its keyword is typed by the user
2) or what user types matches a regular expression.

in case 1, usually what farr does is automatically filter the results returned by the user based on subsequent words on the search string after the first keyword that matched plugin name.

in case 2, usually you do not want subsequent filtering, since presumably you are catching other text on the line besides just the one keyword at the front.

---

now i think the problem with fsubscript is that the parent fsubscript script basically has to match on the raw string (or by matching .* regex) -- so farr doesnt know how to do subsequent filtering.

so i think what i need to add is a pluginp->set_strvalue("filteron",rest of typed search to filter on)

and then fsubscript can call this function with search words after the first matching keyword.

does that make sense?
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #40 on: November 20, 2008, 02:19:05 AM »

Yes, it make sense for me.
Shouldn't we continue calling all the plugins even if one is explicit ? Why stopping the search ?
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #41 on: November 20, 2008, 03:19:31 AM »

Attached is a "sketch" of further ideas -- I think mouser may be the only one with a FARR that can execute the code appropriately (I know I don't have one yet).

Some changes include:

Fubscript/fscript.js:
  • onSearchBegin() requests FARR to 'filteron' based on regular expression matching results -- when regex supplied by plugin

colors/fsubscript.js:
  • Doesn't filter any more

Both:
  • other things I forgot
  • likely more unknown bugs smiley

Regarding why search stops -- I don't have a clear memory of the reasons.  I think it might have had something to do with FARR's current behavior for non-FScript plugins, but it's probably best for mouser to answer this question smiley

* FSubScriptAndColorsExperimental-2008-11-20.zip (3.5 KB - downloaded 124 times.)
« Last Edit: November 20, 2008, 04:08:13 AM by ewemoa » Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #42 on: November 20, 2008, 11:07:07 AM »

cool, trying now.
Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #43 on: November 21, 2008, 08:23:03 AM »

been tweaking a tiny bit and talking to ewemoa about how some things work and he is making great progress extending fsubscript to let each plugin script be triggered normally like all other plugins.  I'd say in very short time fsubscript scripts will be 100% as powerful and flexible as normal fscript plugins.  This is truly a great thing  Kiss Kiss Thmbsup Thmbsup Thmbsup Kiss Kiss
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #44 on: November 21, 2008, 09:45:03 AM »

Good news I'm just waiting for the next farr that will add support for it.
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #45 on: November 21, 2008, 09:53:39 AM »

ecd,
take a well deserved rest until ewe has finished a round of work on your masterpiece  thumbs up
-mouser
Logged
mouser
First Author
Administrator
*****
Posts: 32,699



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

I think that we are going to see the ability to use dqsd searches in FARR come pretty soon based on the work on fsubscript.
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #47 on: November 22, 2008, 06:57:41 AM »

I hope ecaradec has gotten his hands on a version of FARR that can do ForceResultFilter smiley

Attached, please find the latest attempt.

Some changes include:

Fubscript/fscript.js:
  • onSearchBegin() - let me sum up, no, there is too much...Use the source Luke!
  • wrapper function forceResultFilter()

colors/fsubscript.js:
  • More colors
  • Change value for grey
  • Change to arguments of emitResult() in search()

Both:
  • other things I forgot
  • likely more unknown bugs smiley

Revision control, anyone?

* FSubScriptAndColorsExperimental-2008-11-22.zip (4.16 KB - downloaded 122 times.)
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #48 on: November 22, 2008, 10:42:48 AM »

Attached, please find attempt after mouser's corrective suggestions  Wink

Some changes include:

Fubscript/fscript.js:
  • onSearchBegin() - hopefully fixed problems and made clearer
  • fixed and modified types: CLIP=6; ALIASFILE=7;
  • likely more unknown bugs smiley

Recursively searching for fsubscript.js to some depth has not been implemented yet.

* FSubScriptExperimental-2008-11-23.zip (3.3 KB - downloaded 89 times.)
Logged
ewemoa
Honorary Member
**
Posts: 2,244



View Profile Give some DonationCredits to this forum member
« Reply #49 on: November 22, 2008, 05:53:01 PM »

Attached, please find an attempt at recursively searching for fsubscript.js to a limited depth.

Some changes include:

Fubscript/fscript.js:
  • onInit() - local function processFolder(), local variable maxdepth
  • likely more unknown bugs smiley

For testing purposes, I put the colors subdirectory inside a subdirectory of the FSubScript directory.

* FSubScriptExperimentalAndColors-2008-11-23a.zip (5.17 KB - downloaded 104 times.)
Logged
Pages: Prev 1 [2] 3 Next   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.05s | Server load: 0.12 ]