Jump to content

Recommended Posts

Posted

$title = WinGetTitle("[CLASS:MozillaWindowClass]", "")

While $title <> "Sign Out : Mozilla Firefox"

Sleep(20000)

$title = WinGetTitle("[CLASS:MozillaWindowClass]", "")

WEnd

After upgrading Firefox my code now hangs at Sleep(20000). The MozillaWindowClass has not changed (checked with info tool). Any help much thanks.

Posted

Try this.

; Info about Class obtained from running C:\Program Files\AutoIt3\Au3Info.exe ;or,
; SciTE > Tools menu > AU3Info

;#cs
$title = WinGetTitle("[CLASS:MozillaUIWindowClass]", "")
While $title <> "Sign Out : Mozilla Firefox"
    Sleep(2000)
    $title = WinGetTitle("[CLASS:MozillaUIWindowClass]", "")
    ;ConsoleWrite($title & @LF)
WEnd
;#ce

;or

;When Mozilla Firefox window is closed, this running script ends.
While WinExists("[CLASS:MozillaUIWindowClass]", "")
    Sleep(2000)
    ConsoleWrite("running" & @LF)
WEnd

Using the AU3Info tool, the window class of Mozilla Firefox is "MozillaUIWindowClass".

And the class of the control existing on the Mozilla Firefox window is "MozillaWindowClass",

The parameter ,"title", used in the WinGetTitle() and WinExists() functions is to do with the window, not a control.

Posted

@Malkey,

Thank you, your code works. However, My "Info about Class obtained from running Au3Info.exe" does not show me "MozillaUIWindowClass". I'm running Windows 7 64bit Ultimate and AU3 v3.3.6.1.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...