Jump to content
Sign in to follow this  

How to click on a button

Recommended Posts


I'm trying to select  a control with:

;This is for debugging only
;Get Active Window Title
$var = WinList()
Sleep(5000) ; Give me time to select the correct window
For $i = 1 To $var[0][0]
    ; Only display visble windows that have a title
    If $var[$i][0] <> "" And IsVisible($var[$i][1]) Then
        MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1] & @CRLF & "ProcessId: " & WinGetProcess($var[$i][0]))


;This is for debugging only
$title = WinGetTitle("Total Uninstall Professional Edition", "")
WinActivate($title, "")
$text = WinGetText("", "")
$text = StringStripCR($text)
$TextLine = StringSplit($text, @LF)
; $TextLine[0] - will be count of lines in $Text
; $TextLine[1] - will be content of first line in $Text

MsgBox(0, "Text read was:", "Title = " & $title & @CRLF & _ArrayDisplay($TextLine)


;This is the main script I'm trying to select a control with
While Not ControlCommand('Total Uninstall Professional Edition', 'DriverMax 7 [All details]', "TVirtualStringTree2", "IsEnabled", "")
    ControlFocus('Total Uninstall Professional Edition', 'DriverMax 7 [All details]', "TVirtualStringTree2")
ControlClick('Total Uninstall Professional Edition', 'DriverMax 7 [All details]', 'TVirtualStringTree2')

The info window shows:


It won't select it.



Edited: I wasn't getting any suggestions on my problem so I added some debugging information to try to help resolve the issue.  I'm usually requested to remove all debugging information but since I wasn't getting any reply maybe this will help someone figure out what my problem is.

Edited by Docfxit

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