Reputation: 277
I tried to open a pdf file and save it as xml1.0 using pywinauto. i have started writting the below code but i am not able to find the controls for menu and saving it as xml. i am new to pywinauto. can you help me in this. and also please suggest where can i get the tutorial for python pywinauto.
from pywinauto import application
In_File = "sample.pdf"
Ap = "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe"
app = application.Application()
app.start_(Ap)
app.
Thanks
Upvotes: 1
Views: 5753
Reputation: 693
Here is an example for Adobe Reader X
import pywinauto
pwa_app = pywinauto.application.Application()
w_handle = pywinauto.findwindows.find_windows(title=u'Adobe Reader', class_name='AcrobatSDIWindow')[0]
window = pwa_app.window_(handle=w_handle)
window.MenuItem(u'&File->#0').Click()
By the way am the author of GUI tool for pywinauto - SWAPY. It can generate some code. I hope it would help your automation.
Upvotes: 2