Sign in to follow this  
Followers 0
SpiritualMadMan

Hitting Controls Buried In other Controls

5 posts in this topic

First, I apologise for being such a newbie to using AutoIt and drilling down through the Windows GUI structures.

Also, the information is probably right there in front of me... I just don't know what I am looking.

I was using Phantom Test Driver. But, have run into one bug after another and that has run me past the budgetted time allotted so I am hurting for time.

OK... The ATE I am trying to validate the GUI's on has many controls several controls deep. That is Controls, on top of controls that are on top of controls on top of the windwow.

I need to learn how to identify a control at the bottom of the list.

Many of these Controls do not have any unique Control ID or Name. leaving only multiple incidence of the Class to choose from based on its relative position.

So, I suspect I am going to need to be able to enumerate controls on a window or control and then select the correct windows handle?

Something, I've heard about... But, have never done...

Any, advice (other than quitting) would be greatlt appreciated.

Thanks!

Share this post


Link to post
Share on other sites



See WinGetClassList() in the help file. There is also a WinAPIEx function _WinAPI_EnumChildWindows(), which gives you the handles also.

#include <WinAPIEX.au3>
#include <Array.au3>

$sList = WinGetClassList("")
ConsoleWrite($sList & @LF & @LF)


$hWin = WinGetHandle("")
$aList = _WinAPI_EnumChildWindows($hWin, False)
_ArrayDisplay($aList)

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

See WinGetClassList() in the help file. There is also a WinAPIEx function _WinAPI_EnumChildWindows(), which gives you the handles also.

#include <WinAPIEX.au3>
#include <Array.au3>

$sList = WinGetClassList("")
ConsoleWrite($sList & @LF & @LF)

$hWin = WinGetHandle("")
$aList = _WinAPI_EnumChildWindows($hWin, False)
_ArrayDisplay($aList)

:)

Thanks, I did a search of my AutoIt folders and can not find WinAPIEX.au3 can you tell me were it should be?

Thanks!

Share this post


Link to post
Share on other sites

It's in Example Scripts:

:)

Thanks!

I really appreciate your assistance,

It turns out that I was making things way too hard.

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