Sign in to follow this  
Followers 0
mwalkden

While stopped working

6 posts in this topic

$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.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Try using:

$title = WinGetTitle("[CLASS:MozillaWindowClass]", "")
While Not $title = "Sign Out : Mozilla Firefox"
Sleep(20000)
$title = WinGetTitle("[CLASS:MozillaWindowClass]", "")
WEnd
I haven't tested it but it should work.

Edited by vfear

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

Spoke too soon, now my script just goes past the while <> regardless so its not getting the correct info.

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