Sign in to follow this  
Followers 0
Hypertrophy

detecting if a gui is inside another window

9 posts in this topic

I've created a simple gui that I want to drag inside a window with a unique classname. What I was wondering is when i right click and click a menu item on my context menu, how would i be able to detect the title of the 3rd part window that my autoit gui is currently "inside"

thanks so much for your help in advance. God bless.

Share this post


Link to post
Share on other sites



I've created a simple gui that I want to drag inside a window with a unique classname. What I was wondering is when i right click and click a menu item on my context menu, how would i be able to detect the title of the 3rd part window that my autoit gui is currently "inside"

thanks so much for your help in advance. God bless.

_WinAPI_GetParent?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

_WinAPI_GetParent?

_WinAPI_GetAncestor() may be the better choice there.

[center]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.[/center]

Share this post


Link to post
Share on other sites

I think that the user is asking for something like RectInRegion but want to check if one window is completely inside another window. If it's correct, any window in the system is either completely over the desktop window or off the screen. Determining if a window within the desktop window contains the entire GUI rectangle may require to list the Z-order children windows of the desktop and comparing rectangles against the GUI's. I might be wrong.

Share this post


Link to post
Share on other sites

Well for example, how is the AutoIt window info tool doing it? The finder tool is dragged in a window and the window title is immediately found. What function is it using to do this. I would like to simulate this result except with a window.

Share this post


Link to post
Share on other sites

I think that AutoIt Info tool is managing a message procedure in conjunction with a mouse hook procedure. If the mouse is not captured using SetCapture() it can use the mouse hook with functions such as WindowFromPoint, GetParent, GetWindow, etc.. If it does capture the mouse it'll get notified about mouse move events even when the mouse cursor is not above AutoIt Info window. Search the help file and the forum for mouse hook example, you can use the rest inside a $WM_MOUSEMOVE handler.

Share this post


Link to post
Share on other sites

Well for example, how is the AutoIt window info tool doing it? The finder tool is dragged in a window and the window title is immediately found. What function is it using to do this. I would like to simulate this result except with a window.

By using WindowFromPoint and or ChildWindowFromPoint api calls I'm sure.

[center]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.[/center]

Share this post


Link to post
Share on other sites

Well for example, how is the AutoIt window info tool doing it? The finder tool is dragged in a window and the window title is immediately found. What function is it using to do this. I would like to simulate this result except with a window.

I think you need to look up WindowFromPoint, ChildWindowFromPoint and RealChildWindowFromPoint.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

thanks to all very much. God bless.

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