Sign in to follow this  
Followers 0
casanova

Using Window Title And Window Text

4 posts in this topic

Hello,

I am still new to AutoIT, and very frankly, so far i have loved it very much. But there are some things that I am not able to do with AutoIT. I am using V2.64 and wanted some help with some functions that I perform.

I open a browser and use the WinWaitActive command. But for that to work, I need to know the exact title of the window. For most times, I may not know the exact window title, and was wondering if I could use just "Internet Explorer" as an argument to WinWaitActive.

I understand you can use the SetTitleMatchMode to look at a substring of the title, but have not been able to implement it in my scripts. Can someone let me know how I can do this? Just look at a partial title of Internet explorer, and still make the script run the next command.

Also, I would like to know if there is a way to read some TEXT that appears on an active window? Essentially I want to see a TEXT on the active window and perform some operations,,, specially useful for installing programs.

Hoping someone can answer this for me!

Cheers,

Casanova

Share this post


Link to post
Share on other sites



I open a browser and use the WinWaitActive command. But for that to work, I need to know the exact title of the window. For most times, I may not know the exact window title, and was wondering if I could use just "Internet Explorer" as an argument to WinWaitActive.

This should work.

SetTitleMatchMode, 2
WinWaitActive,Internet Explorer

Also, I would like to know if there is a way to read some TEXT that appears on an active window? Essentially I want to see a TEXT on the active window and perform some operations,,, specially useful for installing programs.

In Version 2.64 it is more difficult to do this. Really you have to be able to get that text into a text file and parse it. It is much, MUCH, easier to do it in Version 3. Give version 3 a shot and we can help you in anyway you need.

Just a thought. If you know the exact text you could do.

WinWait,MyTitle
IfWinExist,MyTitle,A Certain Text,GoTo,FirstOption
IfWinExist,MyTitle,A Certain Other Text,Goto,SecondOption

I think this is right I havn't used V2.64 in a while. Funny it took me a long time to move to V3 and now I can't remember V2 commands. :whistle:

red

Share this post


Link to post
Share on other sites

This does not work --

SetTitleMatchMode, 2

WinWaitActive,Internet Explorer

Guess, I am still missing something!

Share this post


Link to post
Share on other sites

WinWaitActive waits till the window also has the focus. in other words is the active window..

Maybe you should test for WinWait in stead.....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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