Jump to content
Sign in to follow this  

WinGetTitle versus WinList

Recommended Posts

i have pretty simple script for Firefox, but it bring strange results - WinGetTitle return blank string and WinList return array with 2 rows - one with blank title and one with actual title.

Row|Col 0|Col 1
[2]|AutoIt General Help and Support - AutoIt Forums - Mozilla Firefox|0x001300A6

and script:

#include <Array.au3>

ConsoleWrite('WinExists("[CLASS:MozillaWindowClass]") = ' & WinExists("[CLASS:MozillaWindowClass]")&@crlf)
ConsoleWrite('WinGetHandle("[CLASS:MozillaWindowClass]") = "'&WinGetHandle("[CLASS:MozillaWindowClass]")&'"'&@crlf)
ConsoleWrite('WinGetTitle("[CLASS:MozillaWindowClass]") = "'&WinGetTitle("[CLASS:MozillaWindowClass]")&'"'&@crlf)
$a=WinList ("[CLASS:MozillaWindowClass]")

Why WinGetTitle doesn't work? Maybe its bug in WinGetTitle?


Share this post

Link to post
Share on other sites

Firefox (and I think IE too) consists of two Windows, one container and one main content window. Your looking for the class, winexists returns the first one found, in this case the container window without a title.

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  

  • Create New...