Jump to content

Recommended Posts

Posted

I am attempting to import certificates into Firefox (version 2 and 3) using AutoIT. The code below gets me to the Options window inside of Firefox but then I must be able to navigate to the Advanced button and then to the Encryption tab and then the View Certificates button. I am gathering that Firefox is not an ideal application to attempt to do AutoIT stuff with, but I need compatibility with both IE and Firefox so here I am. I do not know how to get to the Advanced tab. Any help would be appreciated.

Send("#r")
WinWaitActive("Run", "Type the name of a program")
Send("C:\Program Files{ENTER}")
sleep(1000)
$testForFirefox = ControlListView(@ProgramFilesDir, "", "SysListView321", "FindItem", "Mozilla Firefox") 

if $testForFirefox <> "-1" Then
    $runFirefox = Run("C:\Program Files\Mozilla Firefox\firefox.exe")
EndIf

Send("{ALT}to");Select the Options menu under Tools
Posted

Okay, well... assuming the Main tab is selected, send LEFT, then send TAB, RIGHT RIGHT RIGHT, TAB TAB TAB TAB, ENTER. How to know which tab is selected currently is the only issue. Maybe you can find where Firefox stores the last open tab and reset that to the Main tab.

Posted

Thanks! Yeah I had already tried that (sorry for not mentioning it) and ran into the same problem of finding out which Tab I start at when Options is opened. Anybody know?

  • 2 weeks later...
Posted

Delete the line

user_pref("browser.preferences.advanced.selectedTabIndex", 3);

^^^^^^ this varies of course

from prefs.js in your firefox config (whatever\mozilla\firefox\profiles\crypticstuff.default)

and your firefoxes start with a defined preferences state.

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
×
×
  • Create New...