ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

FScript Javascript SDK - Write FARR plugins in javascript and more.

(1/17) > >>

ecaradec:
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.donationcoder.com/forum/index.php?topic=17153.0

The FScript SDK is available at :
http://e.craft.free.fr/farr/FScript/samples/FScriptSample.rar
The last FScript.dll is downloadable at :
http://e.craft.free.fr/farr/FScript/1.20/fscript.dll
A somewhat incomplete documentation is available at :
http://e.craft.free.fr/farr/FScript/help.html

Here is a basic javascript plugin :

--- Code: Javascript ---// 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"; // typeUNKNOWN=0; FILE=1; FOLDER=2; ALIAS=3; URL=4; PLUGIN=5; CLIP=5;// PostprocessingIMMEDIATE_DISPLAY=0; ADDSCORE=1; MATCH_AGAINST_SEARCH=2;// search stateSTOPPED=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.com/doku.php?id=fscript_documentation

Changelist
1.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/ecaradec/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.

mouser:
wow  :o

Armando:
Hi Ecaradec, the download link doesn't seem to be working... Is it because you're already torturing and updating the poor thing ?  ;)

taichimaster:
WOW nice!!!  :Thmbsup:  The SDK link seems to be broken though.

For plugins developed using scripting languages (ruby, perl, python) that aren't included in WSH by default, do the users need to have the ActiveState engines installed on their machines?

ecaradec:
Ok the url is fixed.
For plugins developed using scripting languages (ruby, perl, python) that aren't included in WSH by default, do the users need to have the ActiveState engines installed on their machines?
-taichimaster (February 09, 2008, 09:51 PM)
--- End quote ---
Yes the active scripting engines must be installed. Look at : http://www.mvps.org/scripting/languages/

Navigation

[0] Message Index

[#] Next page

Go to full version