Sign in to follow this  
Followers 0
hkorchek

Child Windows

13 posts in this topic

Using the Window Info tool for some information I have the two following line in my script:

WinActivate("CareChek", "")

WinActivate("[CLASS:WindowsForms10.window.8.a; INSTANCE:8]", "")

The first bringing up the main program window and the second I need to pull up the child window in that application. I can not for the life of me figure out how to reference it. ANything else I should be looking at?

Thanks all,

Share this post


Link to post
Share on other sites



try _WinAPI_GetAncestor($handle, 1) to get parent window's handle

Share this post


Link to post
Share on other sites

try _WinAPI_GetAncestor($handle, 1) to get parent window's handle

Look at AnyGui.au3 for add child window to an existing window


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

This is a 3rd party app I am working with and the windows are already open. I just need to put the focus on that child window.

Share this post


Link to post
Share on other sites

@hkorcheck using _WinAPI_GetAncestor($handle, 1) u can get the handle of the parent window, replace $handle witn the handle of the main window, the use WinActivate($handle of the parent window)

@firefox what u mean?

Share this post


Link to post
Share on other sites

@hkorcheck using _WinAPI_GetAncestor($handle, 1) u can get the handle of the parent window, replace $handle witn the handle of the main window, the use WinActivate($handle of the parent window)

@firefox what u mean?

Sorry Im still a little new to Autoit. Am I returning the same of the child window to something?

Share this post


Link to post
Share on other sites

@firefox what u mean?

AnyGui.au3 is an udf on autoit exscript forum with you can add child to a window and add controls on it :mellow:


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

what's the point of this in this post?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

what's the point of this in this post?

that's written in the first post that he want to pull up child window in application

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

the child window already exist, he just want give it focus

@hkorchek I think _WinAPI_GetAncestor($handle, 1) is wrong, sorry

Share this post


Link to post
Share on other sites

I uploaded a picture that might help. You can see the child window called "User Management" and I need to bring that window to focus.

post-42284-1227132485_thumb.jpg

Share this post


Link to post
Share on other sites

if u know the title what's the problem:

WinActivate( "User Management" , "")

Share this post


Link to post
Share on other sites

if u know the title what's the problem:

WinActivate( "User Management" , "")
That was the first thing I tried. I am assuming that it will only work for windows that show in the task bar and not child windows like this one.

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