JERPVTX Posted June 22, 2016 Posted June 22, 2016 I am trying to click on several different buttons on an application. I have used the AU3 window info to successfully click almost all of the buttons. There is one that is giving me a hard time, refer to attached images. The first one (image1) shows the details of the "Open All" button. I used the following script to successfully click that button : ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:92]") For the second image I altered that command to: ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:79]") But it does not work. Notice that with the Open button, only the actual Open button is highlighted, but with the Close button both of the buttons are highlighted. This is a program that I believe was written and compiled in C# so I have no way of getting into the source code. I started playing around with relative positions since I know the position of the Open button, I figured I could offset from there to get to the close button but I haven't figured that out yet either. Any help would be greatly appreciated!!!
Danp2 Posted June 22, 2016 Posted June 22, 2016 Check it again with AU3Info. It looks like you grabbed the wrong control. Latest Webdriver UDF Release Webdriver Wiki FAQs
JERPVTX Posted June 22, 2016 Author Posted June 22, 2016 Danp2, Yeah, it looks like that doesn't it. However when I move the AU3 target over the Open button, the Open button gets outlined. When I move the AU3 target over the Close button, the whole group gets outlined. I have no choice, that is what it picks. However, I did write a work around using coordinates. Here's a excerpt of my code to move the mouse: Local $aPosition = ControlGetPos($hWnd, "", "[CLASS:Button; INSTANCE:92]") ;get position of Open button Local $aNewPosition[2] opt("MouseCoordMode", 2); set to relative coordinate mode $aNewPosition[0] = $aPosition[0] + 0.5*$aPosition[2]; Offset x position to center of Close button $aNewPosition[1] = $aPosition[1] + 1.5*$aPosition[3]; Offset y position to center of Close button MouseMove($aNewPosition[0], $aNewPosition[1]) I would very much like to avoid using the MouseMove command if anyone has a solution the the original problem.
Earthshine Posted October 11, 2017 Posted October 11, 2017 (edited) Looking into spy utilities Edited October 11, 2017 by Earthshine My resources are limited. You must ask the right questions
Earthshine Posted October 11, 2017 Posted October 11, 2017 HERE, you want this https://hawkeye.codeplex.com/ mLipok 1 My resources are limited. You must ask the right questions
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