本帖最后由 jackr 于 2024-3-7 16:50 编辑
各位大神帮忙看下,我在用AutoIt v3 window Info v3.3.16.0工具获取两个不同控件(一个是按钮,另一个是勾选控件)得到的ClassnameNN的值都一样,ID因为软件每次打开都会变化,所以没办法用ID来区分不同控件。
我在用ControlClick 点击函数时发生了很大困扰,应该如何写controlID 这个值呢?
ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
按钮控件获取信息如下:
>>>> Window <<<<
Title: TestMinder MP Remote Control Software 1.0
Class: WindowsForms10.Window.8.app.0.1a0e24_r6_ad1
Position: 83, 82
Size: 898, 477
Style: 0x16CB0000
ExStyle: 0x00050300
Handle: 0x00000000002A00C8
>>>> Control <<<<
Class: WindowsForms10.BUTTON.app.0.1a0e24_r6_ad1
Instance: 8
ClassnameNN: WindowsForms10.BUTTON.app.0.1a0e24_r6_ad18
Name: Command_Options
Advanced (Class): [NAME:Command_Options]
ID: 2557624
Text: Options
Position: 19, 369
Size: 66, 28
ControlClick Coords: 46, 9
Style: 0x5601000B
ExStyle: 0x00000000
Handle: 0x00000000002706B8
勾选控件获取信息如下:
check Energy Measurement
>>>> Window <<<<
Title: TestMinder MP Remote Control Software 1.0
Class: WindowsForms10.Window.8.app.0.1a0e24_r6_ad1
Position: 52, 52
Size: 898, 477
Style: 0x16CB0000
ExStyle: 0x00050300
Handle: 0x00000000005C0706
>>>> Control <<<<
Class: WindowsForms10.EDIT.app.0.1a0e24_r6_ad1
Instance: 3
ClassnameNN: WindowsForms10.EDIT.app.0.1a0e24_r6_ad13
Name: Check_Energy
Advanced (Class): [NAME:Check_Energy]
ID: 7407282
Text: Energy
Position: 223, 166
Size: 89, 26
ControlClick Coords: 54, 21
Style: 0x5601000B
如附件图,
|