【问题标题】:pywinauto not connecting to After Effects?pywinauto 没有连接到 After Effects?
【发布时间】:2018-09-20 21:22:04
【问题描述】:
from pywinauto import application
app = application.Application().connect(process=7996)
app.print_control_identifiers()

为什么这段代码不起作用?它会产生错误。

AttributeError: Neither GUI element (wrapper) nor wrapper method 'print_control_identifiers' were found (typo?)

我能想到的唯一原因是它是一个 64 位应用程序,而我有 32 位 Python。

【问题讨论】:

    标签: python python-3.x pywinauto after-effects


    【解决方案1】:

    connect() 在您的代码中运行良好。下一行:print_control_identifiers() 不是app 对象的方法。您需要为此创建顶级窗口规范:

    app.TopWindowTitle.print_control_identifiers()
    

    列出顶部窗口标题:

    print([w.window_text() for w in app.windows()])
    

    【讨论】:

      猜你喜欢
      • 2013-09-30
      • 1970-01-01
      • 1970-01-01
      • 2019-08-09
      • 2014-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-16
      相关资源
      最近更新 更多