cdr Posted July 22, 2006 Posted July 22, 2006 For my current creation, I'd like to be able to get a list of the child windows of an open window - a normal program, not autoit gui. Help? I know you can get the parent window of a child using user32.dll, maybe something in there works?
cdr Posted July 22, 2006 Author Posted July 22, 2006 WinGetClassListGee, how helpful.That gets, well, a list of classes.Does that guarentee it'll get all of the child windows? How do I tell what's a window from that?
cdr Posted July 22, 2006 Author Posted July 22, 2006 Have no clue wtf you're talking about. I don't care how WinGetClassList is implemented, it doesn't even seem useful to me. I just did a search for "WinGetClassList", got two pages of results about controls and none about finding child windows. Mind actually pointing to something useful? Thanks.
Moderators SmOke_N Posted July 22, 2006 Moderators Posted July 22, 2006 Have no clue wtf you're talking about. I don't care how WinGetClassList is implemented, it doesn't even seem useful to me.I just did a search for "WinGetClassList", got two pages of results about controls and none about finding child windows.Mind actually pointing to something useful? Thanks.Yeah... you'll get far talking to people like that, especially a respected Mod like Larry (or any of them for that matter). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
cdr Posted July 22, 2006 Author Posted July 22, 2006 (edited) I guess he must be respected for his... brevity? Honestly, I can't see how he intended to help at all. His first post was one word, and his second one explained what it did rather than how it might be used to solve the problem. I can sort of see how it could maybe be used, but that assumes the child window appears in the class list and that somehow you're able to tell which items in the list are windows. He answered neither of those questions. Edited July 22, 2006 by cdr
Moderators SmOke_N Posted July 22, 2006 Moderators Posted July 22, 2006 I guess he must be respected for his... brevity?Honestly, I can't see how he intended to help at all. His first post was one word, and his second one explained what it did rather than how it might be used to solve the problem.I can sort of see how it could maybe be used, but that assumes the child window appears in the class list and that somehow you're able to tell which items in the list are windows.He answered neither of those questions.Actually... He probably did give you the answer in a round about way.... I haven't checked yet, but maybe do a search for EnumChildWindows ... It uses the user32.dll library also... and may just need a WindowHandle of the parent. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
cdr Posted July 22, 2006 Author Posted July 22, 2006 (edited) Dullard? Heh.No, I don't know what a child window is, other than it's something contained in a parent window. Y'know, like AutoIt says it is with the "parent" option in GUICreate? Maybe you should educate me rather than calling me names.I thought this was the AutoIt help forum, not the A-Hyper-Advanced-Windows-Programming-God-Like-Larry-Must-Be forum.To make it really simple, I want a list of a windows that are contained in a specified window.Sort of like child windows in a parent window, except I don't know what child windows are, so not.For a very simple example, let's say I open up Notepad and open the Replace dialog.On the other hand, thanks to SmOke_N for helping. I'll try to figure out EnumChildWindows. Edited July 22, 2006 by cdr
cdr Posted July 22, 2006 Author Posted July 22, 2006 Again, this is a help forum, since you obviously haven't realized it yet. If you don't want to help, no need to post.
Bert Posted July 22, 2006 Posted July 22, 2006 Lar is very good at dork slapping....I'll pay money to watch! The Vollatran project My blog: http://www.vollysinterestingshit.com/
Richard Robertson Posted July 22, 2006 Posted July 22, 2006 You should be nice before getting any help. By child windows are you asking about controls such as buttons, editboxes, etc or MDI children?
cdr Posted July 22, 2006 Author Posted July 22, 2006 By child windows are you asking about controls such as buttons, editboxes, etc or MDI children?By child windows I mean windows contained within the window. Not sure how you would consider a button or other control a window.This could be a dialog, or whatever. I'm probably not concerned with MDI.Like in the Notepad example, I'd like to be able to input notepad and have it return the Replace/Font/whatever dialog, if that's what was open.
cdr Posted July 22, 2006 Author Posted July 22, 2006 Because a button IS a child window...Humor me. A button may be a child, but how is it a child window? I'm talking about the PARC-developed, Apple-stolen, Windows-popularized thing here. A button is something you might put in a window...
GaryFrost Posted July 22, 2006 Posted July 22, 2006 hwndButton = CreateWindow( "BUTTON", // predefined class "OK", // button text WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // styles // Size and position values are given explicitly, because // the CW_USEDEFAULT constant gives zero values for buttons. 10, // starting x position 10, // starting y position 100, // button width 100, // button height hwnd, // parent window NULL, // No menu (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL); // pointer not needed SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
cdr Posted July 22, 2006 Author Posted July 22, 2006 That's not AutoIt code, so I'm not really sure what you're trying to do. Anyway, the fact that there's a GuiCreate() function and a GuiCtrlCreate() function indicates that there's a difference. You may be able to use a button as the source for a window, but it's still a window (in addition to being a button, maybe) and not a button inside a window.
GaryFrost Posted July 22, 2006 Posted July 22, 2006 that was c code, and guess what AutoIt is written in. What was I trying to do, what you asked, humor you. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
cdr Posted July 22, 2006 Author Posted July 22, 2006 You're saying that a button can be a window, not that a button is a window. Big difference.
GaryFrost Posted July 22, 2006 Posted July 22, 2006 You're saying that a button can be a window, not that a button is a window. Big difference.What do you think many controls are?A toolbar? hmmm that could be a child window (case and point look at the Gui Toolbar in my signature)A statusbar? hmmm that could be a window (this one is now include in the beta, yep it's a window)hyperlink? look at the gui hyperlink in my signature (yep it's a window)etc..In many instances that's exactly what they areas toFor my current creation, I'd like to be able to get a list of the child windows of an open window - a normal program, not autoit gui. Help?Therefore big difference or not you asked about non autoit gui child windows, depending on the application and what language it was written will determine if the control is child window or not. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
cdr Posted July 22, 2006 Author Posted July 22, 2006 Regardless, there's a difference between a window and something that's not a window, so there must be some way to tell them apart.
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