PCrosthwaite Posted November 9, 2015 Share Posted November 9, 2015 Hi, I have a really stupid app that I'm trying to automate some functions in. Basically, i have a bunch of edit controls which i need to double click on. The problem is that the controls ClassNN etc. keep changing each time the window is opened. The only thing that stays the same is the text displayed in the edit control.So far i have ; Get the Window Handle of my appLocal hWnd = WinGetHandle("My Crappy App", ""); Get the control based on the ClassNN$hControl = ControlGetHandle($hWnd, "", "Edit16"); Get the controls position$aPOS = ControlGetPos("", "", $hControl); Doubleclick on the control. Because of the way that the window is displayed, ControlGetPos doesn't seem to be able to return the true location, so add some pixels to get to the right spotMouseclick("left",$aPOS[0]+200,$aPOS[1]+205,2)How can I get the control (so i can use ControlGetPos) if I don't have the ClassNN? Is there a way that I can find it based on the text in the edit control? eg. "SomeText"I've tried to use ControlClick, but this doesn't actually click on the edit control, which is why I'm having to use MouseClick. Any help would be awesome Link to comment Share on other sites More sharing options...
JohnOne Posted November 9, 2015 Share Posted November 9, 2015 $hControl = ControlGetHandle($hWnd, "", "[TEXT:whatever]") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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