【问题标题】:Get clickable mouse point of UIAutomationElement in VBA在VBA中获取UIAutomationElement的可点击鼠标点
【发布时间】:2020-01-21 07:27:53
【问题描述】:

我在 VBA 中使用 UIAUtomationClient。我以前试过这个,但由于某种原因它不再起作用了。我正在尝试获取 uiautomationelement 上的可点击点。

这是我在自动化模块中的代码。

Function GetMousePoint(element As IUIAutomationElement) As tagPOINT
    Dim getPoint As Variant
    getPoint = element.GetClickablePoint(GetMousePoint)
End Function

这是我在主模块中的代码。 importBtn 是 UIAutomationElement。

Dim clickAPI As tagPOINT
clickAPI = Automation.GetMousePoint(importBtn)

我不断收到编译错误,ByRef 参数类型不匹配。

【问题讨论】:

    标签: excel vba automation ui-automation


    【解决方案1】:

    提高参考 UI 中 UIAutomation 的优先级。

    【讨论】:

      猜你喜欢
      • 2016-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-10
      • 2014-05-29
      • 1970-01-01
      • 2022-01-15
      相关资源
      最近更新 更多