matsa Posted September 16, 2013 Share Posted September 16, 2013 Please forgive this noob for asking such simple things. So far I haven't figured out which function can tell me the dimensions of an active window. (Say, I want to click on the "OK" button of a dialog box that always pops in the center of a window. I know the offset of the OK button from the center, i.e. 200,200. So if I can get the size of the windows, then I can get the coords of the center and then easily calculate where exactly that "OK" button is.) I hope my question makes sense. Thank you! Link to comment Share on other sites More sharing options...
Wolfshare Posted September 16, 2013 Share Posted September 16, 2013 Please forgive this noob for asking such simple things. So far I haven't figured out which function can tell me the dimensions of an active window. (Say, I want to click on the "OK" button of a dialog box that always pops in the center of a window. I know the offset of the OK button from the center, i.e. 200,200. So if I can get the size of the windows, then I can get the coords of the center and then easily calculate where exactly that "OK" button is.) I hope my question makes sense. Thank you! You just want to click on okay button, you know the coord? Use http://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm Link to comment Share on other sites More sharing options...
Solution FireFox Posted September 16, 2013 Solution Share Posted September 16, 2013 matsa,Welcome to the autoit forum Take a look at the helpfile:-WinGetPos, get the position and size of a window.-MouseClickHowever, I advice you to use ControlClick and get the window/button infos with the infotool.Br, FireFox. Link to comment Share on other sites More sharing options...
matsa Posted September 16, 2013 Author Share Posted September 16, 2013 -WinGetPos, get the position and size of a window. Thank you, exactly what I was looking for. However, I advice you to use ControlClick and get the window/button infos with the infotool. It's a web page I am working with, which doesn't seem to use windows controls, and thus ControlClick doesn't seem to apply. Wish it did. Thank you though. 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