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

FScript Javascript SDK - Write FARR plugins in javascript and more.

<< < (11/17) > >>

ewemoa:
The following worked a little bit better for me -- though I didn't end up seeing onBeginSearch getting invoked.

What I used:


* Python 2.6.x (ActiveState)
* FScript.dll version 1.13.0.0 (at least that's what I saw via the properties dialog box in explorer)
* FARR 2.48.0.1
* Windows XP
Uncommenting the last line shows that some bits seem to work for me.

Ah, I also have a vague memory that czb had a Python plugin -- may be asking him might shed some light on the matter.  I think a thread w/ the plugin mentioned in it says something about it being discontinued, but he still seems to have a page for it:

http://czb.dcmembers.com/TodoTXT.html


--- Code: Python ---displayname = "TESTPython"versionstring = "0.0.1"releasedatestring = "March 2nd, 2009"author = "Author"updateurl = ""homepageurl = ""shortdescription = "TESTPython"longdescription = "Python Test Plugin, you know?"readmestring = ""iconfilename = "FScript.ico"aliasstr = "ttt"regexstr = ""regexfilterstr = ""keywordstr = ""scorestr = "300" # typeUNKNOWN = 0FILE = 1FOLDER = 2ALIAS = 3URL = 4PLUGIN = 5CLIP = 5# PostprocessingIMMEDIATE_DISPLAY = 0ADDSCORE = 1MATCH_AGAINST_SEARCH = 2# search state constantsSTOPPED = 0SEARCHING = 1 def onSearchBegin(querykey, explicit, queryraw, querynokeyword):  FARR.setStrValue("DisplayAlertMessage", "woohoo")  FARR.setState(querykey, SEARCHING) #start search  #   return result to farr (queryID, title, path, icon, entrytype=FILE, resultpostprocessing=2, score=300)  FARR.emitResult(querykey, "python TITLE", "python PATH", iconfilename, ALIAS, IMMEDIATE_DISPLAY, 5000)  FARR.setState(querykey, STOPPED) #stopped search  # the following seems to work#FARR.setStrValue("DisplayAlertMessage", "loaded python test plugin")

ecaradec:
You  can get the lastest FScript version at http://e.craft.free.fr/farr/FScript/ . The last one is 1.15 currently.

ewemoa:
Thanks for the info concerning 1.15 :)

The following works for me - I haven't tested in-depth, but my suspicion about what made things work out is the signature for onSearchBegin -- I added a couple of more parameters after looking at the "Available Callbacks" section of:

  http://e.craft.free.fr/farr/FScript/help.html


--- Code: Python ---displayname = "TESTPython"versionstring = "0.0.1"releasedatestring = "March 2nd, 2009"author = "Author"updateurl = ""homepageurl = ""shortdescription = "TESTPython"longdescription = "Python Test Plugin, you know?"readmestring = ""iconfilename = "FScript.ico"aliasstr = "ttt"regexstr = ""regexfilterstr = ""keywordstr = ""scorestr = "300" # typeUNKNOWN = 0FILE = 1FOLDER = 2ALIAS = 3URL = 4PLUGIN = 5CLIP = 5# PostprocessingIMMEDIATE_DISPLAY = 0ADDSCORE = 1MATCH_AGAINST_SEARCH = 2# search state constantsSTOPPED = 0SEARCHING = 1 def onInit(currentDirectory):#  FARR.setStrValue("DisplayAlertMessage", "onInit")  return def onSearchBegin(querykey, explicit, queryraw, querynokeyword,                   modifierstring, triggermethod):#  FARR.setStrValue("DisplayAlertMessage", "onSearchBegin")  if not explicit:    return  FARR.setState(querykey, SEARCHING) #start search  #   return result to farr (queryID, title, path, icon, entrytype=FILE, resultpostprocessing=2, score=300)  FARR.emitResult(querykey, "python TITLE", "python PATH", iconfilename, ALIAS, IMMEDIATE_DISPLAY, 5000)  FARR.setState(querykey, STOPPED) #stopped search  def onSetStrValue(name, value):#  FARR.setStrValue("DisplayAlertMessage", "onSetStr: " + name + " " + value)  return # the following seems to work#FARR.setStrValue("DisplayAlertMessage", "loaded python test plugin")

ChrisVN:
Thanks for the tips so far.

I will try the newest version of FScript and I will also try to get TodoTXT running.
I don't like the idea of downgrading to Python v2.x - but if we are running out of ideas I will also test this one.

Any other suggestions?
chris

ChrisVN:
Thanks again

Tonight I will try out the suggested signature for onSearchBegin:
def onSearchBegin(querykey, explicit, queryraw, querynokeyword,
                  modifierstring, triggermethod):

chris

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version