Forum Discussion

wanni's avatar
Occasional Contributor
2 years ago

pywinauto module cannot be used

pywinauto module cannot be used.

After using it, it always reports that there is no win32api module.

How to solve?


def aa():
   import sys
   sys.path.insert(0, r"D:\package")
   from pywinauto.application import Application

   Application().start(r"C:\Program Files (x86)\Friendess\TubePro\TubePro.exe")
   app = Application().connect(path = r"C:\Program Files (x86)\Friendess\TubePro\TubePro.exe")
   app['安全警示 Safety Warning!']['确定'].click()


Run to ‘from pywinauto.application import Application’, and the pop-up window reports an error.


3 Replies