使用 AutoIt 访问 GUI 元素
Access GUI elements using AutoIt
是否可以直接使用 AutoIt 访问 Windows 中的 GUI 元素?例如按句柄和 window 标题的特殊按钮。
这可能吗?如果可能,该怎么做?
是的,这是 AutoIt 的主要功能之一。但并非所有 window 个元素都可以处理。 AutoIt Window Information Tool 允许识别 class of window/control:
例如在 calc.exe 中输入 89+12
:
run("calc.exe")
$calc = winwait("Калькулятор")
ControlClick($calc,"","Button9")
sleep(500)
ControlClick($calc,"","Button14")
sleep(500)
ControlClick($calc,"","Button23")
sleep(500)
ControlClick($calc,"","Button5")
sleep(500)
ControlClick($calc,"","Button11")
sleep(500)
ControlClick($calc,"","Button28")
是否可以直接使用 AutoIt 访问 Windows 中的 GUI 元素?例如按句柄和 window 标题的特殊按钮。
这可能吗?如果可能,该怎么做?
是的,这是 AutoIt 的主要功能之一。但并非所有 window 个元素都可以处理。 AutoIt Window Information Tool 允许识别 class of window/control:
例如在 calc.exe 中输入 89+12
:
run("calc.exe")
$calc = winwait("Калькулятор")
ControlClick($calc,"","Button9")
sleep(500)
ControlClick($calc,"","Button14")
sleep(500)
ControlClick($calc,"","Button23")
sleep(500)
ControlClick($calc,"","Button5")
sleep(500)
ControlClick($calc,"","Button11")
sleep(500)
ControlClick($calc,"","Button28")