Welcome Guest.   Make a donation to an author on the site October 31, 2014, 09:32:49 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.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2] 3 4 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FScript Javascript SDK - Write FARR plugins in javascript and more.  (Read 46093 times)
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #25 on: June 23, 2008, 02:45:03 PM »

FScript 1.7 is uploaded.
onProcessTrigger can now return a set of flags to tell if the result was processed and if farr window should close.
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
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 #26 on: June 23, 2008, 05:44:27 PM »

FScript 1.7 is uploaded.
onProcessTrigger can now return a set of flags to tell if the result was processed and if farr window should close.

Wondefrul Ecaradec: Thanks! I'm eager to play with this...  Thmbsup
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 #27 on: June 23, 2008, 05:46:15 PM »

OR if you are doing a takeover of the OnProcessTrigger, ecaradec just added the ability to tell farr not to close -- you return a value of 1 from that event function. BUT BUT BUT -- i don't think ecaradec has made that new version of fscript public yet (1.6) so you need that first.

What I'm wondering about doing is showing the HTML window with a page generated by the plugin: is that process documented somewhere?

Would it be something as easy as:
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1. var htmlString = "<html><body>Hello World</body></html>:;
  2. FARR.setStrValue("window.htmlmode",htmlString);
« Last Edit: June 23, 2008, 05:49:22 PM by Perry Mowbray » Logged

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



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #28 on: June 23, 2008, 06:48:27 PM »

you would call it like this
FARR.setStrValue("launch","showhtml "+htmlString);
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 #29 on: June 23, 2008, 07:18:28 PM »

you would call it like this
FARR.setStrValue("launch","showhtml "+htmlString);

 Thmbsup
Logged

ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #30 on: July 02, 2008, 12:09:54 PM »

FScript 1.8 is out.
I added some functions to allow the use of autohotkey to build options user interfaces dialog. I find it really nice to build UI.
The principle is to launch the settings executable, let the user change parameters and call PostMessage,0x400,0,0,,FScript/{pluginname} from the ahk script to tell FScript to reload plugins.

1)
function onDoAdvConfig() {
    FARR.exec("settings.ahk", "", currentDirectory)
    return true;
}

2) user change params and press ok
3) save user params into an ini file
4) call PostMessage,0x400,0,0,,FScript/{pluginname} from ahk script to warn your plugin that the options changed. Fscript will call onOptionsChanged to allow you to reload your options. Use FARR.getIniValue to read the user settings.


Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #31 on: July 07, 2008, 08:06:05 PM »

Amazing work as usual. Cant wait to try this out.

Thx Thmbsup
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #32 on: July 08, 2008, 08:43:16 AM »

I just wanted to add that the ahk dialog is demonstrated in the delicious plugin, in case you miss it. smiley
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
nitrix-ud
Charter Member
***
Posts: 482

View Profile Give some DonationCredits to this forum member
« Reply #33 on: July 08, 2008, 11:53:15 AM »

Quote
I just wanted to add that the ahk dialog is demonstrated in the delicious plugin, in case you miss it.

i noticed it since ahk dialog opens up every time i use the delicious plugin (dpu) ... which is very annoying... is it intended, if yes is it possible to remove it ?

btw, delicious plugin is great !

Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #34 on: July 08, 2008, 12:09:36 PM »

This is a bug. However unrelated with the new ahk support.

I will upload a fix but you can fix it now by changing  :
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1.    // no valid password ? ask the user when he start a request
  2.    if(username=="" || password=="")
  3.        showOptions();

with
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1.    // no valid password try to load it
  2.    if(username=="" || password=="")
  3.        onOptionsChanged();
  4.  
  5.    // or ask the user
  6.    if(username=="" || password=="")
  7.        showOptions();

in the plugins/delicious/fscript.js file
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
nitrix-ud
Charter Member
***
Posts: 482

View Profile Give some DonationCredits to this forum member
« Reply #35 on: July 08, 2008, 04:22:02 PM »

Quote
I will upload a fix but you can fix it now by changing

great Wink
Logged
s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #36 on: July 11, 2008, 01:41:14 PM »

ecaradec is there any chance you could add the ability use an html file as the readme file. I tried using readme.html but its not being launched however readme.txt works fine.
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #37 on: July 16, 2008, 07:16:07 AM »

Yes I will add it.
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #38 on: July 16, 2008, 03:13:01 PM »

Thx  Thmbsup
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #39 on: October 16, 2008, 05:54:10 AM »

I don't have any time to to work on fscript currently. I added a link to download the source code in the original message. I'll have time to answer questions, however. Feel free to contact me smiley
« Last Edit: October 16, 2008, 11:39:28 AM by ecaradec » Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #40 on: October 16, 2008, 04:31:31 PM »

ecaradec is there any chance you could add the ability use an html file as the readme file. I tried using readme.html but its not being launched however readme.txt works fine.
I think this one is simple enough. I could fix it if you like. Or ecaradec, if you have time to at least build the DLL I could send you the changed code, it's only 3 lines. I won't integrate it into your git repository though (if I could, that is). Had a look at git and didn't like it Sad. TortoiseSVN is soooo comfortable smiley  (and it looked like work on the 'TortoiseGIT' has been abandoned).
Logged

phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #41 on: October 19, 2008, 07:43:38 AM »

ecaradec is there any chance you could add the ability use an html file as the readme file. I tried using readme.html but its not being launched however readme.txt works fine.
I've uploaded a version that fixes this bug to here (and named it 1.8.1). This version correctly launches the file specified with the readmestring variable when the user clicks the 'View Plugin Readme' button on the FARR Plugin Manager window.

To s.newave: please note that in your GooglePlus plugin you've specified GooglePlus.html as the readme file while the file actually installed with the plugin is called readme.html.

To ecaradec: the offer still stands. If you want I can send you the changed file to integrate it into your source repository.
Logged

s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #42 on: October 20, 2008, 01:11:08 PM »

phitsc: thanks for the update Thmbsup Great timing too as im just finishing up a small update to GoogePlus.

On a related note does anyone know if its possible to use onReceiveKey() in normal mode? Per ecaredec's readme it works great in memo mode but i cant get it to work in normal result mode?
Logged
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #43 on: October 20, 2008, 02:48:22 PM »

On a related note does anyone know if its possible to use onReceiveKey() in normal mode? Per ecaredec's readme it works great in memo mode but i cant get it to work in normal result mode?
I think it's not an FScript problem. If I remember correctly I tried to use it as well (in list mode, with the native plugin interface) and it didn't work. I think it's meant to be used in memo mode only (likewise onIdleTime and the new triggermethod parameter in onSearchBegins). But don't take my word for it. (not sure if that's the correct expression now Wink )
Logged

s.newave
Supporting Member
**
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #44 on: October 20, 2008, 05:19:15 PM »

I think it's not an FScript problem. If I remember correctly I tried to use it as well (in list mode, with the native plugin interface) and it didn't work. I think it's meant to be used in memo mode only (likewise onIdleTime and the new triggermethod parameter in onSearchBegins). But don't take my word for it. (not sure if that's the correct expression now Wink )

That's what i was afraid of. Hopefully when Mouser has some time he can look into expanding the hotkey functionality similar to what i mentioned in this post:

...

I would also imagine that you would need to add an option to specify the scope of the hotkey i.e. global or local. Local hotkeys would only work within FARR whereas global ones would work from anywhere. This could also be expanded to work with plugins similar to how a plugin alias file works. Plugins could then specify hotkeys in a hotkey file that only works within their plugins and have certain plugin specific functions. Keywords/variables could be created for certain actions that could be shared like aliases.

Would be great to give plugins some control over hotkeys that could be managed from the same ui as other hotkeys. This way users could change hotkeys to sort their needs.
« Last Edit: October 20, 2008, 07:03:41 PM by s.newave » Logged
mouser
First Author
Administrator
*****
Posts: 33,614



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #45 on: October 21, 2008, 03:37:57 AM »

Im making my way methodically through all of my programs now updating them with the most important new feature requests.  Anything that plugin writers need will get top priority, so i'm happy to add this in the next couple of weeks.
Logged
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #46 on: October 21, 2008, 05:39:55 AM »

... so i'm happy to add this in the next couple of weeks.
As a native speaker of German I always have to remind myself that when you native English speaking guys say 'a couple' you usually mean two, while we German speakers more often use that expression as 'a few'. At least this is how my English colleagues use it Wink

Related to that I'd like to put the plugin related feature requests I sent you a couple of, no I mean a few weeks ago up for public discussion. I'll do that in a separate topic however.
Logged

ChrisVN
Participant
*
Posts: 7

View Profile Give some DonationCredits to this forum member
« Reply #47 on: March 01, 2009, 07:26:39 AM »

Hello

First of all:
Thanks for FARR and FScript. I like controlling the PC with the keyboard - so this is a perfect tool  smiley

As a former programmer I like the idea of extending the functionality with Python scripts.
I have been searching for a while for a reason to start learning Pyhton  Wink

So: I am new to FARR and Python and got stuck in the beginning.

What I tried to do: I converted the sample ruby-script to the Pyhton syntax.
BUT: the plugin doesn't show up at all in the list of plugins
OR: the proberties of the plugin only contain strange characters like ??????? (see attachted screenshot)

My Setup:
 - Windows Vista
 - ActiveState Python v3
 - FARR
 - FScript dll v1.8.0.0

I created a directory with those files:
c:\Program Files\FARR\Plugins\TESTPython\FScript.dll
c:\Program Files\FARR\Plugins\TESTPython\FScript.ico
c:\Program Files\FARR\Plugins\TESTPython\fscript.py

At this point I have no idea what the problem is  tellme
Any ideas to help me?

Thanks
Chris

p.s.:
this is the pyhton script:

Formatted for Python with the GeSHI Syntax Highlighter [copy or print]
  1. displayname="TESTPython"
  2. versionstring="0.0.1"
  3. author="Author"
  4. iconfilename="FScript.ico"
  5. aliasstr="ttt"
  6. regexstr=""
  7. regexfilterstr=""
  8. keywordstr=""
  9. scorestr="300"
  10.  
  11. # type
  12. UNKNOWN=0; FILE=1; FOLDER=2; ALIAS=3; URL=4; PLUGIN=5; CLIP=5;
  13. # Postprocessing
  14. IMMEDIATE_DISPLAY=0; ADDSCORE=1; MATCH_AGAINST_SEARCH=2;
  15. # search state constants
  16. STOPPED=0; SEARCHING=1;
  17.  
  18. def onSearchBegin(querykey, explicit, queryraw, querynokeyword):
  19.  FARR.setState(querykey,SEARCHING) #start search
  20.  #   return result to farr  (queryID,       , title                            ,path                            , icon                         , entrytype=FILE , resultpostprocessing=2        ,  score=300)
  21.  FARR.emitResult(querykey,"python TITLE", "python PATH", iconfilename, ALIAS    ,IMMEDIATE_DISPLAY ,5000)
  22.  FARR.setState(querykey,STOPPED) #stopped search


* FScript-corrupt-loading.png (47.11 KB, 603x623 - viewed 297 times.)
Logged
mouser
First Author
Administrator
*****
Posts: 33,614



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

You may be the first person actually using any other script language for Fscript besides javascript, and i'd LOVE to see this working.. so i hope ecaradec (FScript author) will check out this thread and help diagnose.  Please don't give up!
Logged
ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #49 on: March 01, 2009, 01:44:02 PM »

Everything seem fine in your sample. I must say that I didn't even try to write a python plugin, since I know little about python. I'll have a look soon.
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
Pages: Prev 1 [2] 3 4 Next   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.068s | Server load: 0.08 ]