topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday December 10, 2024, 5:42 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Calling all plugin coders who usedFscript/Fsubscript -- please upgrade to latest  (Read 22732 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
There is a conflict between plugins that use different versions of the fscript.dll and fsubscript dll, and we really need to get them all updated.
Part of the problem was probably my fault, but the result is that plugins with older versions of fscript/fsubscript can crash with some non-fscript plugins (klipkeeper),
but upgrading the fscript.dll causes these plugins to misbehave, like showing the settings screens over and over.

For an example see this thread: https://www.donation...ex.php?topic=18622.0

SO I think the solution goes like this:
If you authored a plugin using fscript, please go get the latest fscript from this page:
http://e.craft.free.fr/farr/FScript/

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.

In the coming weeks i'm going to be making screencast videos of all the plugins in action so i need them to be working for others who want to try them.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
And what do I do if it doesn't work?  :(

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
what doesn't work?

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
what doesn't work?
Hard to say, but Perry's on first!

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
For all you youngsters who don't get the joke:

http://www.youtube.c.../watch?v=sShMA85pv8M


Screenshot - 9_15_2009 , 12_50_39 PM_thumb.png



Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
what doesn't work?

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

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
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.

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

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
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.

OK: I think I've found it... the short answer is to add the following code to onProcessTrigger:
Code: Javascript [Select]
  1. if(pluginid!=thispluginid){
  2.                         return 0;
  3.                 }

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:
Code: Javascript [Select]
  1. function onProcessTrigger(path, caption, groupname, pluginid, thispluginid,score, entrytype, args, triggermode) {
  2.                 if(triggermode!=TM_EXPLICIT){
  3.                         return 0;
  4.                 }
  5.     counter++;
  6.     FARR.setStrValue("setsearch", "fscript");
  7.     return HANDLED;
  8. }

The above code didn't work at all (counter never changed) so I added the following (format changes for readability):
Code: Javascript [Select]
  1. FARR.debug("Path: " + path +
  2.                     "; Caption: " + caption +
  3.                     "; GroupName: " + groupname +
  4.                     "; PluginID: " + pluginid +
  5.                     "; ThisPlugin: " + thispluginid +
  6.                     "; Score: " + score +
  7.                     "; EntryType: " + entrytype +
  8.                     "; Args: " + args +
  9.                     "; TriggerMode: " + triggermode)

When launching a spreadsheet this was displayed:
Screenshot - 17_09_2009 , 9_26_14 PM.png
When launching FScriptSample this was displayed:
Screenshot - 17_09_2009 , 9_27_40 PM.png

From that I assumed that PluginID should equal ThisPluginID and changed the code to:
Code: Javascript [Select]
  1. function onProcessTrigger(path, caption, groupname, pluginid, thispluginid,score, entrytype, args, triggermode) {
  2.                 if(pluginid!=thispluginid){
  3.                         return 0;
  4.                 }
  5.                 FARR.debug("Path: " + path + "; Caption: " + caption + "; GroupName: " + groupname + "; PluginID: " + pluginid + "; ThisPlugin: " + thispluginid + "; Score: " + score + "; EntryType: " + entrytype + "Args: " + args + "; TriggerMode: " + triggermode)
  6.     counter++;
  7.     FARR.setStrValue("setsearch", "fscript");
  8.     return HANDLED;
  9. }

With that the Plugin correctly returned 0 when called when launching the spreadsheet, and incremented counter correctly and displayed the following:
Screenshot - 17_09_2009 , 9_31_15 PM.png

Concerning the mystery of where I got the version of onProcessTrigger...
The version that is distributed with the (latest) sample is:
Code: Javascript [Select]
  1. HANDLED=1; CLOSE=2;
  2. function onProcessTrigger(path, caption) {
  3.     counter++;
  4.     FARR.setStrValue("setsearch", "fscript");
  5.     return HANDLED;
  6. }

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

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
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.

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

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
TimeZone[/url] is done
Well done, Perry  :up:  :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
thank you so much for solving this mystery Perry, you basically hit the nail on the head.

the onProcessTrigger function is called whenever any result is launched -- whether created by your plugin or by another or by no plugin at all.

so to make your plugin only try to handle it's own -- you check thispluginid vs pluginid and ignore it if they don't match -- UNLESS you are writing a plugin that is trying to take over all launching.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
so to make your plugin only try to handle it's own -- you check thispluginid vs pluginid and ignore it if they don't match -- UNLESS you are writing a plugin that is trying to take over all launching.

All good in that regard: just had to correct the example.

But I've discovered that FScript has also lost its ability to Trigger vbScripts  :(  :(   :(