IanN1990 Posted October 13, 2011 Posted October 13, 2011 (edited) 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 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 April 14, 2012 by IanN1990
somdcomputerguy Posted October 14, 2011 Posted October 14, 2011 (edited) 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.xedit: This thread may lead you somewhere.. Edited October 14, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
IanN1990 Posted October 14, 2011 Author Posted October 14, 2011 (edited) ================================================================== ;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 October 14, 2011 by IanN1990
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now