Welcome Guest.   Make a donation to an author on the site November 23, 2014, 04:57:44 AM  *

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.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: New FARR plugin : FFTab allow to switch firefox tab  (Read 13433 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
« on: February 07, 2009, 02:20:17 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.n...t/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.



* CZBFSubScript.zip (234.83 KB - downloaded 495 times.)
* FFTab.zip (3.84 KB - downloaded 484 times.)
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
Nod5
Supporting Member
**
Posts: 749



View Profile Give some DonationCredits to this forum member
« Reply #1 on: February 07, 2009, 06:05:04 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?
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 #2 on: February 07, 2009, 07:39:36 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.
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
Nod5
Supporting Member
**
Posts: 749



View Profile Give some DonationCredits to this forum member
« Reply #3 on: February 08, 2009, 07:18:05 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.
Logged
mouser
First Author
Administrator
*****
Posts: 33,690



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: February 08, 2009, 08:14:20 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.
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 #5 on: February 09, 2009, 02:32:17 AM »

Is a pcommand just running a command on trigger ? It seem that I don't know everything FARR smiley. 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 ?
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
mouser
First Author
Administrator
*****
Posts: 33,690



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: February 09, 2009, 06:41:50 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.
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 #7 on: February 09, 2009, 08:08:03 AM »

do I catch the pcommand on the onprocesstrigger function ?
Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
mouser
First Author
Administrator
*****
Posts: 33,690



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: February 09, 2009, 09:29:58 AM »

no it's called with a setstrvalue
Logged
czb
Moderator
*****
Posts: 335



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: February 09, 2009, 01:39:44 PM »

Yes, it is handled by
Quote
setStrValue: function (varname,value){
  if(varname == "pcommand"){
  }
}
when using fsubscripts.
Logged

My open-source online piano game: http://musicope.com/
ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #10 on: March 14, 2009, 08:40:47 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:

Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  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:

Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  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 Wink

Nice work  Thmbsup
Logged
Armando
Charter Member
***
Posts: 2,683



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: June 14, 2009, 09:09:25 PM »

Hello. Tried all the steps... But shows me the error message  "Can't connect to Firefox".
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #12 on: February 16, 2010, 06:26:22 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:35 PM by ewemoa » Logged
Pages: [1]   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.043s | Server load: 0.13 ]