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.

<< < (16/17) > >>

ewemoa:
Good luck :)

benjarry:
Hi, I am a newbie for fscript.  Now I come across a issue.

 When do a search in editbox, I customize the result list below the search box. I want to define some action when I hit [enter]. But I don't know which callback function is. I try onProcessTrigger in fscript, but sounds not work.

Just a simple snippet code


// 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;




--- ---//fscript.js


       function onSearchBegin(querykey, explicit, queryraw, querynokeyword, modifier, triggermethod) {   
if(!explicit) {
return;
}
FARR.setState(querykey,SEARCHING);
FARR.emitResult(querykey,"Hello-key", "Hello-val", iconfilename,UNKNOWN,IMMEDIATE_DISPLAY,1000);
FARR.emitResult(querykey,"Hi-key", "Hi-val", iconfilename,UNKNOWN,IMMEDIATE_DISPLAY,1000);
FARR.setState(querykey,STOPPED);


// FARR.setStrValue("DisplayBalloonMessage", "explicit : "+explicit)

}


HANDLED=1; CLOSE=2;
function onProcessTrigger(path, caption) {
    alert(1);
    FARR.setStrValue("DisplayBalloonMessage", "path : "+path+" caption:"+caption);
    return HANDLED;
}




Thanks for any suggestions.  :P

mouser:
Welcome to the site, benjarry!

It's been so long since I used fscript, but it looks to me like you are doing things correctly.
At some point FARR moved from OnProcessTrigger to OnProcessTriggerV2 with a different set of parameters, and it caused some weirdness with fscript.  I know that was resolved but I think it may still be out of date in some way.
I think that's related to your issue but I'm still trying to remember the solution -- I hope someone else will jump in here but I will try to look around in the mean time.
So please don't give up, we'll figure this out  :up:

mouser:
I suspect these posts hold the solution:
 https://www.donationcoder.com/forum/index.php?topic=19976.msg177969#msg177969
 https://www.donationcoder.com/forum/index.php?topic=19976.msg177994#msg177994
 https://www.donationcoder.com/forum/index.php?topic=19869.msg176875#msg176875

benjarry:
Thanks mouser, very fast response!!
I found the fubscript use below callback (add some more params). I don't know any relationship with it.


--- ---function onProcessTrigger(path, caption, groupname, pluginid, thispluginid, score, entrytype, args){
I get lasted version from the this thread. I don't know where to get the v2. It's better has some examples which use the onProcessTrigger, so that I can get inspired from that.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version