qwert Posted November 30, 2007 Posted November 30, 2007 (edited) For two weeks I've researched and tried everything I can think of to get the handle of the Child Window of an application window. I simply want to adjust the size and position of the "inner child". In the past, I've accomplished it with CMDOW: c:\twigs\cmdow "DbSQL - [DbSQL]" /siz 600 800 /mov 201 2 c:\twigs\cmdow "DbSQL" /siz 400 600Here's how the window components look when listed: 0x010220 1 3724 Res Ina Ena Vis DbSQL - [DbSQL] 0x020224 1 3724 Res Ina Ena Vis MDIClient 0x030250 1 3724 Res Ina Ena Vis DbSQL 0x040216 1 3724 Res Ina Ena Vis ScrollBar 0x0202BA 1 3724 Res Ina Ena Vis ScrollBarThese are the AutoIt3 steps that fail: Opt("WinTitleMatchMode", 3) $hWnd = WinGetHandle("DbSQL") This always returns null -- unless I set Mode=1 or 2, and then it returns 0x010220, the same as when using "DbSQL - [DbSQL]". Is there a way to get the handle 0x030250 instead? (I've already tried Mode=4 with various combinations of CLASS:DbSQL and other specifiers.) Any help with this will be GREATLY appreciated. Edited November 30, 2007 by qwert
Fossil Rock Posted November 30, 2007 Posted November 30, 2007 ControlGetHandle ( "title", "text", controlID ) Agreement is not necessary - thinking for one's self is!
qwert Posted November 30, 2007 Author Posted November 30, 2007 Excellent. Thanks very much. I had tried that previously but was caught up and confused by the "DbSQL - [DbSQL]" construct. What works is this:ControlGetHandle ( "DbSQL", "", "DbSQL")This is a breakthrough for me in understanding the hierarchy of GUI elements. I have several of the CMDOW files that I will now be able to port to AutoIt3. Thanks again.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now