Welcome Guest.   Make a donation to an author on the site December 20, 2014, 07:09:37 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.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 2 3 [4]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FScript Javascript SDK - Write FARR plugins in javascript and more.  (Read 47229 times)
ewemoa
Honorary Member
**
Posts: 2,523



View Profile Give some DonationCredits to this forum member
« Reply #75 on: October 16, 2013, 07:16:24 AM »

Good luck smiley
Logged
benjarry
Participant
*
Posts: 4


View Profile Give some DonationCredits to this forum member
« Reply #76 on: December 19, 2014, 10:45:42 AM »

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;



[copy or print]
//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.  tongue
Logged
mouser
First Author
Administrator
*****
Posts: 33,790



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #77 on: December 19, 2014, 10:50:13 AM »

Welcome to the site, benjarry!

It's been so long since I used fscript, but it looks to me like you are doing things correctly.
At some point FARR moved from OnProcessTrigger to OnProcessTriggerV2 with a different set of parameters, and it caused some weirdness with fscript.  I know that was resolved but I think it may still be out of date in some way.
I think that's related to your issue but I'm still trying to remember the solution -- I hope someone else will jump in here but I will try to look around in the mean time.
So please don't give up, we'll figure this out  thumbs up

Logged
mouser
First Author
Administrator
*****
Posts: 33,790



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #78 on: December 19, 2014, 10:55:53 AM »

I suspect these posts hold the solution:
 http://www.donationcoder....19976.msg177969#msg177969
 http://www.donationcoder....19976.msg177994#msg177994
 http://www.donationcoder....19869.msg176875#msg176875
« Last Edit: December 19, 2014, 12:09:42 PM by mouser » Logged
benjarry
Participant
*
Posts: 4


View Profile Give some DonationCredits to this forum member
« Reply #79 on: December 19, 2014, 11:02:01 AM »

Thanks mouser, very fast response!!
I found the fubscript use below callback (add some more params). I don't know any relationship with it.

[copy or print]
function onProcessTrigger(path, caption, groupname, pluginid, thispluginid, score, entrytype, args){

I get lasted version from the this thread. I don't know where to get the v2. It's better has some examples which use the onProcessTrigger, so that I can get inspired from that.

Logged
mouser
First Author
Administrator
*****
Posts: 33,790



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #80 on: December 19, 2014, 11:03:42 AM »

Try using
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1. function onProcessTriggerV2(path, title, groupname, pluginid, thispluginid, score, entrytype, args, triggermode) {

on your same dll
Logged
benjarry
Participant
*
Posts: 4


View Profile Give some DonationCredits to this forum member
« Reply #81 on: December 19, 2014, 11:16:34 AM »

I try the onProcessTriggerV2 with same methods, still not work. When I hit the [enter], it does not do anything except only exit quietly. No error message popout. strange
Logged
benjarry
Participant
*
Posts: 4


View Profile Give some DonationCredits to this forum member
« Reply #82 on: December 19, 2014, 11:54:08 AM »

After I change to onProcessTriggerV2 , now it work out. But I found it was triggered when I select this item, not the callback for when I trigger [enter].
Logged
mouser
First Author
Administrator
*****
Posts: 33,790



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #83 on: December 19, 2014, 11:57:50 AM »

Ok, that's some progress!
Logged
Pages: Prev 1 2 3 [4]   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.035s | Server load: 0 ]