Jump to content

Verifiying Internet Explorer Title


Recommended Posts

Is there a way i can make autoit verify the internet explorer window title if it is say

"SomeWebSite.com - " User001 "'s Page - Microsoft Internet Explorer"

where User001 is not constant, and will change.

It must be able to pick up the last part of the title.

I know I can set up an and to get them to both be present, but how do I recognize the last part?

Edited by groovel
Link to comment
Share on other sites

You might also want to consider that a registry key can change the default title if the user has permissions to change that key:

$IETitle = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "Window Title")
If @error Then $IETitle = "Microsoft Internet Explorer"

; rest of your code would go here... for example:
Opt("WinTitleMatchMode", 2)   ;2 = match any substring in title
If WinActive($IETitle) Then MsgBox(0,"","Internet Explorer is active.")

Edit: I should really start previewing my posts.... fixed the url tags

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
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
 Share

  • Recently Browsing   0 members

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