Jump to content

How to detect presence of a sub-window?


dgr
 Share

Recommended Posts

Hello,

Beiing a complete dutch newbie in AutoIT I'm looking for a solution for my problem over two days now.

Tried a lot of things using topics in this forum and from the AutoIt-helpfile but unfortionally still not succeeded to solve the problem.

I hope someone can and will help....

In the application I will automate with AutoIT there is a main window called "Intramed - Skrep Kinderfysio (728956) - G.R.Dorenbos"

Using the function Winactive I can very well in AutoIT detect if the main window is activated or not and perform the things I want based on that detection.

There is a sub-window under the main window in the application called "Patienten" which has, when using the AutoIT-Window-Info-tool, the same Title and Class as the main window "Intramed - Skrep Kinderfysio (728956) - G.R.Dorenbos" - "TIntraMain".

The difference is visible in the Basic Control Info of the sub-window which reads "Class: TFormPatienten" and "Instance: 1".

See also the attached picture.

I've tried everything I could think of to determine the presence of the sub-window but I did not succeed in making AutoIt recognise that window.

Using WinTitleMatchMode was no succes even as the advanced window descriptions..

I could't find any hint in the doc to include the basic control info into the Winactive-function or another solution, but maybe I overlooked?

Can anybody help me out? Many thanks in advance!

post-48685-1240137470_thumb.jpg

Edited by dgr
Link to comment
Share on other sites

Thanks for your suggestion, Jos.

I tried it, but still have problems naming the child in the search because of the same windowname/class.

The difference only can be seen in the basic control info of the child-window.

Do you have any hint of using that info (basic control info) in the search?

Thanks in advance for any reply!

Link to comment
Share on other sites

  • Developers

You cannot select the child window by using the unique title for that window ?

It looks like the window you want to select has "Patienten" in it?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thats exactly the problem:

The child-window has indeed Patienten in it's header onscreen, but info from the AutoIT-windowInfo-tool gives exactly the same basic Window info as the parent-window:

basic window info parent-window:

Title: Intramed - Skrep Kinderfysio (729856) - G.R. Dorenbos

Class: TIntraMain

Basic Control Info is empty at the parent-window

basic window info child-window:

Title: Intramed - Skrep Kinderfysio (729856) - G.R. Dorenbos

Class: TIntraMain

Basic Control Info:

Class: TFormPatienten

Instance: 1

so that's the point where I get lost....

Link to comment
Share on other sites

  • Developers

Thats exactly the problem:

The child-window has indeed Patienten in it's header onscreen, but info from the AutoIT-windowInfo-tool gives exactly the same basic Window info as the parent-window:

basic window info parent-window:

Title: Intramed - Skrep Kinderfysio (729856) - G.R. Dorenbos

Class: TIntraMain

Basic Control Info is empty at the parent-window

basic window info child-window:

Title: Intramed - Skrep Kinderfysio (729856) - G.R. Dorenbos

Class: TIntraMain

Basic Control Info:

Class: TFormPatienten

Instance: 1

so that's the point where I get lost....

I guess I was asking if you tried to use "Patienten" to check for the Window?

Opt("WinSearchChildren", 1) 
WinActivate("Patienten")
;  etc

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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