使用 Python 的 Pywinauto 库,可以通过以下代码获取 MenuItem 控制类型下的所有项并打印输出:

from pywinauto import controls

menu_items = controls.MenuItem().get_all_properties()['texts']
print(menu_items)

这段代码将打印出所有 MenuItem 控制类型下的项。

Python Pywinauto 获取 MenuItem 控制类型下的所有项

原文地址: https://www.cveoy.top/t/topic/nhTf 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录