i *think*, if i remember correctly, that what you are experiencing is that farr/fsscript call onprocesstrigger differently, and a minor change is needed to your code now to test if indeed it should trigger or not. i believe this is the source of the incompatibilities which is why we need to get everyone updated. let me talk to ecaradec and czb and see if i cant post instructions on how the change should be implemented. it's something minor and its my fault.
-mouser
OK: I think I've found it... the short answer is to add the following code to onProcessTrigger:
if(pluginid!=thispluginid){
return 0;
}
The longer answer follows...
I downloaded the latest FScriptSample (
http://e.craft.free....es/FScriptSample.rar) and placed it into FARR's Plugin directory, and then replaced the dll with the latest version 1.19 (
http://e.craft.free....ipt/1.19/fscript.dll).
I'm not actually sure where I got it from now (can't seem to find it anywhere
), but the onProcessTrigger I ended up with was:
function onProcessTrigger(path, caption, groupname, pluginid, thispluginid,score, entrytype, args, triggermode) {
if(triggermode!=TM_EXPLICIT){
return 0;
}
counter++;
FARR.setStrValue("setsearch", "fscript");
return HANDLED;
}
The above code didn't work at all (counter never changed) so I added the following (
format changes for readability):
FARR.debug("Path: " + path +
"; Caption: " + caption +
"; GroupName: " + groupname +
"; PluginID: " + pluginid +
"; ThisPlugin: " + thispluginid +
"; Score: " + score +
"; EntryType: " + entrytype +
"; Args: " + args +
"; TriggerMode: " + triggermode)
When launching a spreadsheet this was displayed:
When launching FScriptSample this was displayed:
From that I assumed that
PluginID should equal
ThisPluginID and changed the code to:
function onProcessTrigger(path, caption, groupname, pluginid, thispluginid,score, entrytype, args, triggermode) {
if(pluginid!=thispluginid){
return 0;
}
FARR.debug("Path: " + path + "; Caption: " + caption + "; GroupName: " + groupname + "; PluginID: " + pluginid + "; ThisPlugin: " + thispluginid + "; Score: " + score + "; EntryType: " + entrytype + "Args: " + args + "; TriggerMode: " + triggermode)
counter++;
FARR.setStrValue("setsearch", "fscript");
return HANDLED;
}
With that the Plugin correctly returned 0 when called when launching the spreadsheet, and incremented counter correctly and displayed the following:
Concerning the mystery of where I got the version of onProcessTrigger...The version that is distributed with the (latest) sample is:
HANDLED=1; CLOSE=2;
function onProcessTrigger(path, caption) {
counter++;
FARR.setStrValue("setsearch", "fscript");
return HANDLED;
}
This version works for FScriptSample, but other triggers don't work: (eg can't run the spreadsheet, just get Hello).
I've searched everywhere for the version that I used, but can't find it anywhere, but I must have got it somewhere... But some of the parameters don't seem to get filled: which is confusing.