DonationCoder.com Forum

DonationCoder.com Software => Find And Run Robot => Mouser's Zone => FARR Plugins and Aliases => Topic started by: ecaradec on February 07, 2009, 02:20 PM

Title: New FARR plugin : FFTab allow to switch firefox tab
Post by: ecaradec on February 07, 2009, 02:20 PM
I'm please to show my new little baby project. FFTab. FFTab connect FARR to Firefox to list the tabs and then switch them.

Installation steps :
1. first install mozrepl (you can use the direct xpi link - that would normally trigger the yellow firefox warning and install the firefox extension )
http://repo.hyperstruct.net/mozrepl/0.2/mozrepl.xpi
You can get more info at mozrepl at :
http://wiki.github.com/bard/mozrepl
then under tools click on "start" and "activate on startup"

2. then you need to install CZBFSubScript (attached ) instead of the current czb fsubscript if you already have it. Don't worry it should be 100% compatible with the last version (I took the CSB pack - is it ok CZB ? ) and only the fscript.dll has changed.

3. finally install FFTab (attached ), restart farr, and type fftab to list and switch tabs (you need to have a firefox open )

Good luck with installation.

I'm sure a lot of thing can be done with mozrepl since everything that is doable for firefox with extension can be done through repl. I hope we have some mozilla hackers here because I would love to see plugins interacting with Firefox. Creating tabs, switching, create shortcuts, extract html fragments etc... many things should be doable.


Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: Nod5 on February 07, 2009, 06:05 PM
Sounds great. :Thmbsup: Will try it tomorrow. For this we need FF running of course. But in general, is it possible for mozrepl to interact with FF files (I'm specifically thinking of the bookmarks database file) even when FF is closed?
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: ecaradec on February 07, 2009, 07:39 PM
Sounds great. :Thmbsup: Will try it tomorrow. For this we need FF running of course. But in general, is it possible for mozrepl to interact with FF files (I'm specifically thinking of the bookmarks database file) even when FF is closed?
I don't think it is a solution for reading ffox data. mozrepl is running in the ffox process, so it is not available when ffox is not running. It is mostly useful for interactions.
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: Nod5 on February 08, 2009, 07:18 AM
Ok I suspected that.

I've previously read about ways to access the bookmarks database file externally but a problem then was that that the database file was locked when firefox was running. With the mozrepl the problem is reversed. But if a FARR plugin or other script combined the methods (if FF is running, use mozrepl, else use the other methods) then there could be an external FF bookmark manager that works regardless if FF is running or not.
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: mouser on February 08, 2009, 08:14 AM
What might be nice is if your mozrepl interface from farr would support pcommand calls so it could be used as a kind of plugin-api for other plugin writers to be able to interact with firefox; perhaps with an additional command to launch ff if it's not running yet.

With such a thing it would be easy for people to write other mini plugins that can script firefox actions of any sort.

ps.
I really would like to get the FSubScript release included with FARR soon so that everyone who downloads farr has FSubScript stuff installed by default, and then kept updated through updater.  It would make it easier and more appealing for people to create these lightweight fsubscript plugins.
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: ecaradec on February 09, 2009, 02:32 AM
Is a pcommand just running a command on trigger ? It seem that I don't know everything FARR :). However if you look at the code, it is very easy to do something else with it. There is a ffeval function that open a socket, write and read then return the value.**

fsubscript is enough complete so that it could be distributed with FARR ihmo. Updates will do the rest. Czb is it ok for you ? May be we could put the update  somewhere on dc ?
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: mouser on February 09, 2009, 06:41 AM
pcommand is just a way for one plugin or alias to send a broadcast to all plugins, and the plugin that understands the request performs it.
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: ecaradec on February 09, 2009, 08:08 AM
do I catch the pcommand on the onprocesstrigger function ?
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: mouser on February 09, 2009, 09:29 AM
no it's called with a setstrvalue
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: czb on February 09, 2009, 01:39 PM
Yes, it is handled by
setStrValue: function (varname,value){
  if(varname == "pcommand"){
  }
}
when using fsubscripts.
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: ewemoa on March 14, 2009, 08:40 AM
So, I finally tried this out -- actually I ported the code so I could use it w/ vanilla fscript.  In the process of trying to get it to work, I became puzzled by the following code:

Code: Javascript [Select]
  1. trigger:function(path, title, groupname, pluginid, thispluginid, score, entrytype, args, triggermode) {
  2.         if(entrytype!="fftab")
  3.             return;

That didn't work for me, but something analogous to the following did:

Code: Javascript [Select]
  1. trigger:function(path, title, groupname, pluginid, thispluginid, score, entrytype, args, triggermode) {
  2.         if(groupname!="fftab")
  3.             return;

After making the appropriate change (and using the appropriate FScript.dll included in the CZBFSubScript.zip attached to the OP) it appears to be working locally.  Prety neat!  Now if I could get myself to switch back to FF ;)

Nice work  :Thmbsup:
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: Armando on June 14, 2009, 09:09 PM
Hello. Tried all the steps... But shows me the error message  "Can't connect to Firefox".
Title: Re: New FARR plugin : FFTab allow to switch firefox tab
Post by: ewemoa on February 16, 2010, 06:26 PM
I got "Can't connect to Firefox" too, but I had success after selecting the following in Firefox:

  Tools -> MozRepl -> Start

The following page helped me to learn this:

  http://wiki.github.com/bard/mozrepl/starting-the-repl

FWIW, here's a standalone version of fftab (http://ewemoa.dcmembers.com/Plugins/fftab/fftab.zip).