Jump to content
Sign in to follow this  
Docfxit

How to click on a button

Recommended Posts

Docfxit

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]))
    EndIf
Next

post-6489-0-01625600-1376070841_thumb.jp

;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)

post-6489-0-82711800-1376073883_thumb.jp

;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", "")
    Sleep(100)
    ControlFocus('Total Uninstall Professional Edition', 'DriverMax 7 [All details]', "TVirtualStringTree2")
WEnd
ControlClick('Total Uninstall Professional Edition', 'DriverMax 7 [All details]', 'TVirtualStringTree2')

The info window shows:

post-6489-0-42037200-1375937649_thumb.jp

It won't select it.

Thanks,

Docfxit
 

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  

×