Python 3 PyWinAuto Script to Automate Notepad GUI to Open Create and Save Files and Close Automatically Full Project For Beginners



First of all you need to install the library using the pip command as shown below



pip install pywinauto



After this you need to make an file and copy paste the following code



from pywinauto.application import Application
app = Application().start("notepad.exe")
app.UntitledNotepad.Edit.type_keys("This is Kushan Amarasiri - Python Rocks...", with_spaces = True)
app.UntitledNotepad.menu_select("File->Save As")
dlg = app.window(title='Save As')

Leave a Reply