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

Calling all plugin coders who usedFscript/Fsubscript -- please upgrade to latest

<< < (2/3) > >>

Perry Mowbray:
what doesn't work?
-mouser (September 15, 2009, 10:48 AM)
--- End quote ---

Does that mean I Don't Know is coming next?

I did try to convert my TimeZone plugin to use 1.18 or 1.19 but had lots of issues. From memory onProcessTrigger was being called in TimeZone for each Trigger in FARR (regardless if the Search trigger was a result of a TimeZone search).

I was PM'ing ecaradec, but it never got resolved  :( So I gave up and kept using the one that worked.

Recent thought: could other plugins on my system be mucking it up??

mouser:
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.

Perry Mowbray:
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 (September 15, 2009, 11:16 PM)
--- End quote ---

Thanks: appreciate it. That was what I thought but I could not get a confirmation on the code to use.

Perry Mowbray:
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 (September 15, 2009, 11:16 PM)
--- End quote ---

OK: I think I've found it... the short answer is to add the following code to onProcessTrigger:

--- Code: Javascript ---if(pluginid!=thispluginid){                        return 0;                }
The longer answer follows...  ;)

I downloaded the latest FScriptSample (http://e.craft.free.fr/farr/FScript/samples/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.fr/farr/FScript/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:

--- Code: Javascript ---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):

--- Code: Javascript ---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:

--- Code: Javascript ---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:

--- Code: Javascript ---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.

Perry Mowbray:
And then test your plugin and make sure it all works fine, and then upload a new version with the new fscript and let us know it's updated.
-mouser (September 09, 2009, 10:55 PM)
--- End quote ---

TimeZone is done  :Thmbsup: (this turned out better than I hoped!!)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version