| View previous topic :: View next topic |
| Author |
Message |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Aug 08, 2002 3:53 am Post subject: Getting Child Windows/Controls... |
|
|
I think this has been asked before, but has anyone figured
out how to get more than one child window/control info from
a program with VDS?
I've tried using "@window()" (with each parameter), but
at best, it just keeps going down the same tree from ONE
child (child of the child, of the child, of the child, etc.).
I'd like to get ALL first level child windows/controls instead
of just tracing a single child to extinction.
And what determines which child "@window()" starts with
anyway???!!!
Thanks, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Aug 08, 2002 10:54 am Post subject: |
|
|
Hey Mac,
Can't you just do this:
| Code: |
%%Window = #SomeWindow
%%child = @window(%%window,Child)
repeat
%%Child = @Window(%%child,next)
info %%child
until @not(%%Child)
|
Doesn't this get all the top line child windows? _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Aug 08, 2002 11:23 am Post subject: |
|
|
Nope. In fact here's the code I tried before I posted
(almost identical to yours).
I added it to my Spy Tool, and when I click on VDS
for example, it keeps going like the energizer bunny,
and I get some info an all open windows (and program
manager even). That's why I limited it to 50 items.
Maybe NEXT means "next program window"? The help
file is woefully inadequate on using the @window()
parameters...
The @window(%%child, CHILD) comes closest (at
least it stays in the same window), but you can open
VDS Winspy and check that it only traces one child
window or control.
Unless I'm really confused...
| Code: |
%%child = %%target
REPEAT
%%child = @window(%%child,NEXT)
LIST ADD, L1, %%child - @winclass(%%child)
UNTIL @not(%%child)@greater(@count(L1),50)
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Aug 08, 2002 11:37 am Post subject: |
|
|
Hummm...Odd. You got my interest. I may be obsessed with
this now. Thanks a lot!  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Aug 08, 2002 11:50 am Post subject: |
|
|
LOL, congratulations...
Hmmm... maybe ya hafta use @window(%%child, FIRST)
then @window(%%child, NEXT) or something...
I dunno, I'm gonna hafta get some sleep. It's either
awfully early or awfully late... zzzzzzzzzzzz
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Aug 08, 2002 12:21 pm Post subject: |
|
|
| I think Chris is right, but like you said, Mac, use "first" instead of "child". |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Aug 10, 2002 2:34 am Post subject: |
|
|
Well, I've tinkered with the @window() parameters
about all I'm goin' to. I finally added a routine to
scan windows for child controls to the "Spy Tool"
I made, but it scans using @winatpoint().
http://www.vdsworld.com/forum/viewtopic.php?p=2792#2792
If anybody can get a @window() procedure to get
all first level child controls, please let me know...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|