我也是这两天搞 uiautomation,你试试直接 import uiautomation,然后 t=uiautomation.WindowControl()
这是我参考的文档,希望对你有帮助
https://blog.csdn.net/chenmozhe22/article/details/106926071?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163185378116780264058347%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=163185378116780264058347&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-106926071.first_rank_v2_pc_rank_v29&utm_term=PC%E7%AB%AFUI%E8%87%AA%E5%8A%A8%E5%8C%96&spm=1018.2226.3001.4187