Proph Posted January 28, 2015 Share Posted January 28, 2015 I'm trying to take the time to learn IUIAutomation so that I can better automate some programs that have controls which are QWidgets. I asked a question in the IUIAutomation example thread and was asked by junkew to forward my question here for better support. I have used simplespy.au3 to find a button called "Scan" and the code given by simplespy works great. It finds and clicks the button just fine. But on the next section of this program simplespy does not find a name for the button I am trying to click. Instead the code given clicks in the middle of the window. junkew had mentioned that... with iuiAutomation QWidgets are supported but apparently in your second output i already can see your control is not having a name as an propery to identify you only can fallback to descriptions like: class:=qwidget;instance:=3 or use title:=<a textname that is there>;indexafter:=3 to refer to 3rd control after the control with the name <a textname that is there> I'm not quite sure where in the code to put the class:=qwidget;instance:=3 or title:=<a textname that is there>;indexafter:=3. Everything I try does not seem to work. The program I am testing this on is Malwarebytes 2. I'll attach a screenshot of the window. I am trying to click the "Scan Now" button. I will also attach the simplespy output I get when I hover over the "Scan Now" button and press CTRL+W. SimpleSpy_output2.txt Link to comment Share on other sites More sharing options...
junkew Posted January 29, 2015 Share Posted January 29, 2015 check if you understand example 8 it uses the autoit forum as an example but below states Find the element with name:=search (thats the textbox) and then just skip to element 3 after which is the button const $cSearchButton="name:=Search.*; indexrelative:=3" The hard part is counting the number of elements in between (inspect.exe helps a lot in this) FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Proph Posted January 31, 2015 Author Share Posted January 31, 2015 OK... thanks I will try that this weekend. 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