Sign in to follow this  
Followers 0
Proph

[IUIAutomation] Help with clicking a button simplespy can't view name...

3 posts in this topic

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

post-6011-0-93736900-1422485750_thumb.jp

Share this post


Link to post
Share on other sites



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)

Share this post


Link to post
Share on other sites

OK... thanks I will try that this weekend. :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0