Fscript is a plugin that allow to write FARR plugin in javascript natively (and in others languages if they are correctly set up ). The principle is to copy the fscript.dll in a plugin folder, to add a file named fscript.js in the same folder (or fscript.rb, fscript.pl, fscript.py for others languages ).
Rem : If you are only interested in writing Javascript plugins you should consider using FSubScript plugin that does the same as FScript (actually FSubScript is itself a FScript plugin ) but can host many plugins simultaneously thus reducing the memory usage.
There is at least two version of FSubScript and the most up to date is CZB version available at :
https://www.donation...ex.php?topic=17153.0The FScript SDK is available at :
http://e.craft.free....es/FScriptSample.rarThe last FScript.dll is downloadable at :
http://e.craft.free....ipt/1.20/fscript.dllA somewhat incomplete documentation is available at :
http://e.craft.free....rr/FScript/help.htmlHere is a basic javascript plugin :
// plugin script :
displayname="FScript";
versionstring="1.0.0";
releasedatestring="Jan 1st, 2008";
author="Author";
updateurl="";
homepageurl="";
shortdescription="FScript";
longdescription="FScript";
advconfigstring="FScript";
readmestring="FScript";
iconfilename="FScript.ico";
aliasstr="fscript";
regexstr="";
regexfilterstr="";
keywordstr="";
scorestr="300";
// type
UNKNOWN=0; FILE=1; FOLDER=2; ALIAS=3; URL=4; PLUGIN=5; CLIP=5;
// Postprocessing
IMMEDIATE_DISPLAY=0; ADDSCORE=1; MATCH_AGAINST_SEARCH=2;
// search state
STOPPED=0; SEARCHING=1;
function onSearchBegin(querykey, explicit, queryraw, querynokeyword, modifier, triggermethod) {
if(!explicit) {
return;
}
FARR.setState(querykey,SEARCHING);
FARR.emitResult(querykey,"Hello", "Hello", iconfilename,UNKNOWN,IMMEDIATE_DISPLAY,1000);
FARR.setState(querykey,STOPPED);
}
The full documentation is available on the aliases and scripts plugins wiki :
http://farr.dcisv.co...script_documentationChangelist1.19
- restore the compatibility with previous versions. onProcessTrigger is emulated when the version of FARR use onProcessTriggerV2.
- increase the getStrValue buffer to 1 Mo allow to read bigger string
1.18 [warning incompatible change]
- onProcessTriggerV2 has change to onProcessTrigger to allow FARR plugins to behave the same way on new and old FARR versions.
=> the incompatible change is of interest for plugins writers, just rename the function in the script to get precedent behavior.
1.17
- fix a crash with the KlipKeeper plugin in AllowProcessTriggerV2.
1.16
- fix a crash in AllowProcessTrigger
1.15
- add socket support (string only, this is suitable for doing telnet like things )
1.14
- increase the size of getStrValue that could be bigger than expected
1.13
- add support for onProcessTriggerV2
1.12
- add the getObject function to access WMI facilities
1.11
- enable interprocess communication with the plugins through WM_USER+1 messages
- add support to read the keyboard state
- add support to read the current query in the input box
1.10
- add groupname and args to emitResults function and triggerResults
- add help file
- add onDoShowReadMe callback
1.8
- return a correct value on onStrValue Callback
- add ability to read .INI file (for easing compatibility with ahk )
1.6
- add support for onGetStrValue callback
- allow to not close FARR on onProcessTrigger
1.5
- support for api evolutions of FARR
- support callback for onDoAdvConfig
- support for onSearchBeginV2 and onRegexSearchMatchV2 callbacks
- support for onIdleTime
- support for onReceiveKey
- fix an incompatibility when multiple fscript plugins where loaded at the same time
- support for timers
- support for xml generated options (deprecated )
I released the sources of FScript if you want to throw an eye at it. You can grab a copy of the latest sources at http://github.com/ec.../fscript/tree/master. Adding function should not be very hard if you need them. Just look at other functions and add new ones. The scripts interface are exposed via COM so don't forget to edit the idl to add your functions too. You can ask questions too. I will certainly answer.