Jump to content
Sign in to follow this  
IanN1990

[Closed] Firefox 7.0.1 Change tab

Recommended Posts

IanN1990

Heya,

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

else

minimize firefox

endif

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

endif

Edited by IanN1990

Share this post


Link to post
Share on other sites
somdcomputerguy

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.

Share this post


Link to post
Share on other sites
IanN1990

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

#include 
#include 
#include 

$aTabs = _CurrentFFTabs()
_ArrayDisplay($aTabs)

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]
    Next
    Return $aRtn
EndFunc   ;==>_CurrentFFTabs

Edited by IanN1990

Share this post


Link to post
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
Sign in to follow this  

×