smcombs Posted September 24, 2009 Share Posted September 24, 2009 Hello, Before I ask my question I want to say that this is a question and I currently dont have any source code going I just want to know if this is possible. I have a client window of an application, that on certain objects the handle to the mouse will change and so will the icon. I am curious if there is a way to search the client area and report at where the handle in the client are would be located. Almost as if you would be doing a search for a handle inside of a window. Any help would be greatly appreciated. Thanks. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 24, 2009 Share Posted September 24, 2009 Hello,Before I ask my question I want to say that this is a question and I currently dont have any source code going I just want to know if this is possible. I have a client window of an application, that on certain objects the handle to the mouse will change and so will the icon. I am curious if there is a way to search the client area and report at where the handle in the client are would be located.Almost as if you would be doing a search for a handle inside of a window. Any help would be greatly appreciated.Thanks.Your broken English is hard to follow. Are you looking to get the handle of a window or control at certain X/Y coordinates? Look at the advanced specifications, which include X/Y/W/H. SmOke_N posted a function to get the handle from a point using the DLL call for "WindowFromPoint".If all you want is the current location of a control that moved, use ControlGetPos(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
bo8ster Posted September 25, 2009 Share Posted September 25, 2009 Also have a look at AutoItSetOption("MouseCoordMode", 2). You won't need to search where the mouse is. I believe the function PsaltyDS is talking about is _CtrlGetByPos(), it will do the hard work for you. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
smcombs Posted December 10, 2009 Author Share Posted December 10, 2009 Thanks very much and I am American btw lol. It was late when I posted this so sorry for the "broken english". I will try these out and see what I get. Let me explain more what I am referring to. Sometimes, if a control is visible within the current window, and the mouse is over it. The mouse cursor will change, that cursor has a specific handle to it. I am curious if its possible to search a window and see if the mouse cursor handle is within view. And if it is can I get the position of where the handle is. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 10, 2009 Share Posted December 10, 2009 MouseGetPos() and MouseGetCursor()? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
smcombs Posted December 10, 2009 Author Share Posted December 10, 2009 I am wanting to do this on an inactive window. The window is visible but its not active. Its on another monitor.....I guess what I am asking is, is the handle that changes the mouse cursor visible on the window or does it exist in the client area of the window. Link to comment Share on other sites More sharing options...
bo8ster Posted December 11, 2009 Share Posted December 11, 2009 You are getting into the area of no easy answer. Generally speaking, the program will control what mouse pointer is displayed. At the same time windows knows where the mouse is - what program it is over and the application can find that out. It is possible to find out what the mouse is doing on an inactive or active windows if required. What do you mean by handle? It is either mouse pointer, the window/client area or a handle to one of them. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
smcombs Posted December 13, 2009 Author Share Posted December 13, 2009 The handle belongs to what the mouse becomes when the cursor changes. Whenever I put the mouse over the the control in the window, I noticed that whenever the mouse changed to a plus sign the handle of the mouse cursor changes. Sorry for the inaccuracy, _WinAPI_GetCursorInfo() this is the function I was using. I greatly apologize for not showing this first but I couldnt find the function I was using. Its a return value from that function, Cursor Handle: its this handle that changes. Sorry for the trouble and thanks again, Steven Link to comment Share on other sites More sharing options...
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