[-AI-] 动态CLASSNN

楼主: GodIsland (搞不定吗用C4就对了)   2022-05-25 13:13:22
解决按钮开启CLASS 固定是WindowsForms10.BUTTON.app.0.378734a,
但是INSTANCE每次都可能变动
靠文字比对,取得当下的 CLASSNN
get ID or ClassNN for a control/button? - AutoIt General Help and Support -
AutoIt Forums
https://www.autoitscript.com/forum/topic/55372
-get-id-or-classnn-for-a-controlbutton/
$title = "Marshmallow Fluff Installer"
$text = ""
$checktext = "I understand by leaving this box checked I will be allowing the
Marshmallow Fluff Overlord to "
$i = 1
While Not @error = 1
If ControlCommand($title, $text, "Button" & $i, "IsVisible", "") Then
$text = ControlGetText($title, $text, "Button" & $i)
If StringInStr($text, $checktext) Then
If ControlCommand($title, $text, "Button" & $i, "IsChecked", "")
Then
ControlFocus($title, $text, "Button" & $i)
ControlClick($title, $text, "Button" & $i)
EndIf
MsgBox(64, "Unchecked", $text)
EndIf
EndIf
$i += 1

Links booklink

Contact Us: admin [ a t ] ucptt.com