Jump to content
Sign in to follow this  

How to change Firefox Options

Recommended Posts

I have the code to install Firefox.  I'd like to change the options. This script starts to change the options but I can't figure out how to select menu on the left.  Comments in the code...

Global $title, $Text

If Not (ProcessExists("firefox.exe")) Then Run("C:\Program Files\" & "FireFox\FireFox.exe")
WinWait("Mozilla Firefox", "")
If Not WinActive("Mozilla Firefox", "") Then WinActivate("Mozilla Firefox", "")
WinWaitActive("Mozilla Firefox", "")
Local $hWnd = WinGetHandle('[Active]')
$title = WinGetTitle("[Active]")
WinActivate($title, "")
$Text = WinGetText("[ACTIVE]")
$Text = StringStripCR($Text)
$TextLine = StringSplit($Text, @LF)
; $TextLine[0] - will be count of lines in $Text
; $TextLine[1] - will be content of first line in $Text
; MsgBox(0, @ScriptName,  'Line ' & @ScriptLineNumber & @CRLF & "Menu should be open " & '---' & ' (' &  $title & ') ' & '---')

If ($title = "New Tab - Mozilla Firefox" Or "Mozilla Firefox") Then

    WinWait($title, "")
    If Not WinActive($title, "") Then WinActivate($title, "")
    WinWaitActive($title, "")
;   Turning on the menu line with Alt-t works temporarily
;       I'd like to find out how to make it perminant.

    Send("o")     ;Options
    WinWait("Options", "")
    If Not WinActive("Options", "") Then WinActivate("Options", "")
    WinWaitActive("Options", "")
    Send("{Tab 15}")
; The above works
; I need AutoIt to select the Home icon on the left menu
;     Then Homepage and new windows
;        Then Firefox Home (Default) and change it to Custom URL's
;          Then Down one box and enter "https:google.com" (without the quotes)


Func _Au3RecordSetup()
    Opt('WinWaitDelay', 100)
    Opt("WinTitleMatchMode", 4)
    Opt('WinDetectHiddenText', 1)
    Opt('MouseCoordMode', 0)
    Opt("TrayIconDebug", 1)     ;0-off
    ; Set so that tray displays current line number
    HotKeySet("{ESC}", "_Exit")     ;If you press ESC the script will stop
EndFunc   ;==>_Au3RecordSetup

Func _Exit()
EndFunc   ;==>_Exit



Share this post

Link to post
Share on other sites

You could just create a user.js file in the FF user profile dir, and add user_pref("browser.startup.homepage", "www.google.com");

Or search for the "user_pref("browser.startup.homepage", "DEFAULT FF HOMEPAGE");" in prefs.js and replace the default ff homepage.

More info here



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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...