Welcome Guest.   Make a donation to an author on the site October 24, 2014, 01:13:12 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Calling all plugin coders who usedFscript/Fsubscript -- please upgrade to latest  (Read 8027 times)
mouser
First Author
Administrator
*****
Posts: 33,586



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: September 09, 2009, 10:55:39 PM »

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: http://www.donationcoder....m/index.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.
Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: September 15, 2009, 05:06:08 AM »

And what do I do if it doesn't work?  Sad
Logged

mouser
First Author
Administrator
*****
Posts: 33,586



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: September 15, 2009, 10:48:01 AM »

what doesn't work?
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,182



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: September 15, 2009, 12:49:59 PM »

what doesn't work?
Hard to say, but Perry's on first!
Logged

Chris
mouser
First Author
Administrator
*****
Posts: 33,586



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: September 15, 2009, 12:52:02 PM »

For all you youngsters who don't get the joke:

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





Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: September 15, 2009, 10:10:21 PM »

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  Sad So I gave up and kept using the one that worked.

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

mouser
First Author
Administrator
*****
Posts: 33,586



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: September 15, 2009, 11:16:08 PM »

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.
Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: September 15, 2009, 11:25:09 PM »

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.
Logged

Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: September 17, 2009, 07:49:54 AM »

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:
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1. if(pluginid!=thispluginid){
  2. return 0;
  3. }

The longer answer follows...  Wink

I downloaded the latest FScriptSample (http://e.craft.free.fr/fa...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/fa.../FScript/1.19/fscript.dll).

I'm not actually sure where I got it from now (can't seem to find it anywhere  undecided embarassed), but the onProcessTrigger I ended up with was:
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  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):
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  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:

When launching FScriptSample this was displayed:


From that I assumed that PluginID should equal ThisPluginID and changed the code to:
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  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:


Concerning the mystery of where I got the version of onProcessTrigger...
The version that is distributed with the (latest) sample is:
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  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.
Logged

Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: September 17, 2009, 08:53:47 AM »

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!!)
Logged

cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,182



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: September 17, 2009, 12:42:53 PM »

TimeZone[/url] is done
Well done, Perry  thumbs up  thumbs up
Logged

Chris
mouser
First Author
Administrator
*****
Posts: 33,586



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: September 17, 2009, 01:55:43 PM »

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.
Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: September 18, 2009, 06:17:27 AM »

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  Sad  Sad   Sad
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.072s | Server load: 0.17 ]