improbability_paradox Posted November 7, 2006 Posted November 7, 2006 Hi there. I am new to this forum, but have been using AutoIT for about a year now. I am currently working on a script, and would like to know if there is any way that I can get the ClassNameNN or Control ID of the control currently under the mouse (same info that I would get with AU3INFO, but from within the script itself). I have looked through the help file extensively, and searched this forum as well, but I couldn't really find anything that related to what I want to accomplish. Any ideas, anyone? thanks in advance. Regards, Improbability
PaulIA Posted November 7, 2006 Posted November 7, 2006 Would this work for you?_CtrlGetByPos Auto3Lib: A library of over 1200 functions for AutoIt
improbability_paradox Posted November 7, 2006 Author Posted November 7, 2006 Would this work for you?_CtrlGetByPosThat may just do it! I will test it out and let you know.
Moderators SmOke_N Posted November 7, 2006 Moderators Posted November 7, 2006 _MouseGetCtrlInfo 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.
PaulIA Posted November 7, 2006 Posted November 7, 2006 That may just do it! I will test it out and let you know.Sounds good (and welcome to the forum!) Auto3Lib: A library of over 1200 functions for AutoIt
improbability_paradox Posted November 8, 2006 Author Posted November 8, 2006 (edited) _MouseGetCtrlInfoAfter a bit of testing/troubleshooting, this worked perfectly for me. It is basically the same code used in _CtrlGetByPos (also by smOke_N) but with a few changes and already set up to work with the mouse coordinates. the only thing I had to change in the function itself was the line Local $hWin = WinGetHandle(''), $hCtrlWnd = '', $sClassList = WinGetClassList($hWin)which became Local $hWin = WinGetHandle("active"), $hCtrlWnd = '', $sClassList = WinGetClassList($hWin)and was really only necessary because of my own code which came prior to the function being called. Awesome! thank you both for your replies! Edited November 8, 2006 by improbability_paradox
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