I have been trying to automate a button click using an auto IT script in an application.
The window title of the application is EDI867 Tracer and the button I am trying to click is Browse.
The control info that I got from Autoit Window Info is as below
>>>> Window <<<<
Title: EDI867 TRACER
Class: WindowsForms10.Window.8.app.0.378734a
Position: 0, 0
Size: 1366, 728
Style: 0x16010000
ExStyle: 0x00050000
Handle: 0x00E606C6
>>>> Control <<<<
Class: WindowsForms10.Window.8.app.0.378734a
Instance: 5
ClassnameNN: WindowsForms10.Window.8.app.0.378734a5
Name: btnBrowse
Advanced (Class): [NAME:btnBrowse]
ID: 7998122
Text:
Position: 1236, 70
Size: 93, 24
ControlClick Coords: 25, 11
Style: 0x56010000
ExStyle: 0x00000000
Handle: 0x007A0AAA
>>>> Mouse <<<<
Position: 1261, 81
Cursor ID: 0
Color: 0xE5FFF2
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
EDI867
Comparison
File
Customer :
CalComp :
Status :
EDI TRACER
>>>> Hidden Text <<<<
EDI861
File
I am trying to control click this button. I tried all the possible controlclick
syntax that I know using the above window info but nothing seems to automate the button click.
I am open for suggestions to find a solution.
Try getting the valid handle of the window using attributes.
Also get the handle of the control by using AutoIT window info.
The button class should be something like CLASS:WindowsForms10.BUTTON.app.0.378734a
and its instance should be also given (say 5). Then script looks like:
Local $hSecWnd=WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a; W:1366; H:728]")
ControlClick($hSecWnd,"","[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:5]")
User contributions licensed under CC BY-SA 3.0