Sign in to follow this  
Followers 0
Max in montreal

title information

8 posts in this topic

so i have a window opened, location 0,0.

in the title of this window therwe is a number in brackets, lets say (12345).

another window, i want to click the mouse, until the same number apears in that second windows title...

so basically something like;

does this new window have (12345) in the title...

Share this post


Link to post
Share on other sites

and the problem is...?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

i trying to figure out how i can compare 2 titles.

first title is something like "abcdef(max 12345)", and the second one is "max 12345"

the complete title of the second window must be part of the first window title, to get out of my loop.

I guess i am asking for a simple example on how to do this;

if part of the title of window located at 0,0 is the complete title of window located at 400,400 exit loop

thanks in advance!

Edited by Max in montreal

Share this post


Link to post
Share on other sites

WinTitleMatchMode Alters the method that is used to match window titles during search operations.

1 = Match the title from the start (default)

2 = Match any substring in the title

3 = Exact title match

4 = Advanced mode, see Window Titles & Text (Advanced)

-1 to -4 = force lower case match according to other type of match.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

now how do you find the title of the window located at 0,0?

im looking at the example in the help;

$title = WinGetTitle("Untitled -", "")

but i need to do it by location...

can we translate this into auto it code..

get the title of the window that is located at 0,0, and put it into a variable called $table1

Edited by Max in montreal

Share this post


Link to post
Share on other sites

Maybe...

$List=WinList()
For $i=1 to $List[0][0]
    If _WinIsVisible($List[$i][0],"") Then
        $Pos=WinGetPos($List[$i][1],"")
        If $Pos[0]=0 and $Pos[1]=0 Then
            $table1=$List[$i][0]
        EndIf
    EndIf
Next
Func _WinIsVisible($Title, $Text="")
    Return BitAND(WinGetState($Title, $Text), 2)
EndFunc

Share this post


Link to post
Share on other sites

WinGetTitle ( "title" [, "text"] )should be WinGetTitle ( "title" [, "text"], x,,y )

where the x, and y is optional...no?

Share this post


Link to post
Share on other sites

Try the loop first...

A Combination would be WinGetTitle() and WinGetPos()

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