Jump to content

[Closed] Firefox 7.0.1 Change tab


Recommended Posts


I am in the middle of a small coding product and had an idea to improve it but i am not to sure how to go about it :graduated:

is there any way to write a if-statement that would function like this

If $a=1 and "firefox has more then 1 tab open" then

change to different tab


minimize firefox


also is there a way to make the code remember the orignal tab, so it could change it back to it after its finished.

such as

if $a=0 then

change firefox to orginal tab before it was switched


Edited by IanN1990
Link to comment
Share on other sites

The Firefox UDF (FF.au3) has several tab-related functions that will accomplish all this, but I believe that UDF won't work with Firefoxes greater than version 3.x.x

edit: This thread may lead you somewhere..

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

;Returns an array of open tab urls,
;[0] contains the count of open tabs
;[n] contains the urls


$aTabs = _CurrentFFTabs()

Func _CurrentFFTabs()
    Local $aRtn[1]
    $sPath = @AppDataDir & "\Mozilla\Firefox\Profiles\"
    $aFolder = _FileListToArray($sPath, "*.default", 2)
    $sFolder = $aFolder[1]
    $sFile = FileRead($sPath & $sFolder & "\sessionstore.js")
    $sFile = StringLeft($sFile, StringInStr($sFile, "_closedTabs"))
    $stmp = StringStripWS($sFile, 8)
    $atmp = StringSplit($stmp, '_formDataSaved', 3)
    ReDim $aRtn[UBound($atmp)]
    $aRtn[0] = UBound($atmp) -1
    For $i = 0 To UBound($atmp) - 2
        $atmp2 = _StringBetween($atmp[$i], '"url":"', '","title')
        $aRtn[$i+1] = $atmp2[UBound($atmp2) - 1]
    Return $aRtn
EndFunc   ;==>_CurrentFFTabs

Edited by IanN1990
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...