Jump to content

Controlclick - Select a button


Docfxit
 Share

Recommended Posts

Then we're both on Win7 64bit. And using HomeSeer HS3 Version 3.0.0.500 as you can see from the UIASpy output in the posts above.

Are you using an old version of CUIAutomation2.au3? You must use the version provided with UIASpy in the Includes folder.


I've tested HomeSeer on Windows 10. There is no UI Automation support. Only MSAA-automation support. HomeSeer seems to be a pretty old program that's only updated to Windows 7. At least the automation code.

It should be possible to automate such an old program with standard code. And it certainly is. You do it this way:

Example()

Func Example()
  Local $hHandle = WinGetHandle( "HomeSeer HS3" )
  ConsoleWrite( "$hHandle = " & $hHandle & @CRLF )
  WinActivate( $hHandle )
  ControlClick( $hHandle, "", "[NAME:btnRegister]" ) 
EndFunc

You can automate the License dialog the same way. It should work on all Windows versions.

Link to comment
Share on other sites

I don't understand how I ran UIASpy before.  I know I received an error when I ran it and had to do a search to find CUIAutomation2.au3.  It seems there are a lot of versions of CUIAutomation2.au3.  After your explanation I see you have CUIAutomation2.au3 in the includes file in the UIASpy.7z file.  In order for me to commingle it in my setup I have renamed the include folder included in UIASpy.7z to UIASpyInclude and I have changed UIASpy.au3 to:

#include "UIASpyIncludes\UIASpy_Gui.au3"

UIASpy_Gui()


Now I'm seeing buttons instead of pane controls.

Thank you for explaining all that,

Docfxit

Edited by Docfxit
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...