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.