Sign in to follow this  
Followers 0
Bert

Firefox addon update automation

4 posts in this topic

I've made a simple script to assist the loading of Outlook and 2 instances of Firefox when I log into my PC at work. Works fine. I've noticed however a small problem automating a window and I want to make sure I'm not being stupid. It has to do with the addon update window you get when there is an update for on of your installed addons. On the bottom of the window, there is a button called "Install Updates". I'm just trying to send a keystroke to it. I can do it if I do ALT+I manually using the keyboard no problem. Here is the wrinkle - no matter what I do, I can't use the send or controlsend to automate the "Install Update" button. What is real odd is though is I can use send or controlsend to work with the menubar on the top of the window. For example, ALT+F will open the file menu no problem.

In testing, I tried working with the "Show Information" button which is ALT+S. That doesn't work either if I try to automate it. Works fine if I use the keyboard directly. Very odd.

Here is the script I've been playing around with to see if I can do it. You can see where Ive been commenting out things in an attempt to get it working.

$FU2 =  WinExists ("[CLASS:MozillaDialogClass]") 
    $FUS =  WinGetPos ( "[CLASS:MozillaDialogClass]")
    if $FU2 = 1 and $FUS <> 0 Then
        if  $FUS[3] > 200 then 
                WinActivate("[CLASS:MozillaDialogClass]")
                sleep(500)
                Send("{ALT}s")
                sleep(20)
;~              Send("S")
;~              ControlSend("[CLASS:MozillaDialogClass]", "","", "S")
;~              ControlSend("[CLASS:MozillaDialogClass]", "","", "f")
;~              Send("{ALTUP}")
        EndIf
    endif

The script will make the window in question gain focus everytime, so I know I have the "[CLASS:MozillaDialogClass]" right.

Can someone test this with Firefox to see if it is my rig or am I just missing something. Thanks.

Note: I do not wish to do a mouseclick to do this. If the window changes size for any reason, it breaks. Also, I have to be careful of just what I install on my rig, so using FF.au3 is not an option for me on my work rig.

Share this post


Link to post
Share on other sites



I was able to have that code work, but only when I replaced [CLASS:MozillaDialogClass] with Mozilla. BTW, ALT+s brings up the History in my Firefox.


- 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

Oh yeah, re: the alt+s, forgot about the 'Install Updates' window thing.. Anyway, glad you got it woking.


- 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

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  
Followers 0