topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 9:40 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: New FARR plugin : FFTab allow to switch firefox tab  (Read 25742 times)

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
New FARR plugin : FFTab allow to switch firefox tab
« 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.hyperstr...repl/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.


Blog & Projects : Blog | Qatapult | SwiffOut | FScript

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #1 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?

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #2 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.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #3 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.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #4 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.

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #5 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 ?
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #6 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.

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #7 on: February 09, 2009, 08:08 AM »
do I catch the pcommand on the onprocesstrigger function ?
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #8 on: February 09, 2009, 09:29 AM »
no it's called with a setstrvalue

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #9 on: February 09, 2009, 01:39 PM »
Yes, it is handled by
setStrValue: function (varname,value){
  if(varname == "pcommand"){
  }
}
when using fsubscripts.
My open-source online piano game: https://github.com/musicope/game

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #10 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:

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #11 on: June 14, 2009, 09:09 PM »
Hello. Tried all the steps... But shows me the error message  "Can't connect to Firefox".

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: New FARR plugin : FFTab allow to switch firefox tab
« Reply #12 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.
« Last Edit: February 16, 2010, 07:12 PM by ewemoa »