-->

How To Press

2019-02-18 06:01发布

问题:

from pywinauto import application
app = application.Application.start("C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.exe")
app.Microsoft_Excel.TypeKeys('%a')

%a = Alt + a

I Want Ctrl + a. is there a sign for this?

回答1:

You must use Control key specifier - ^, so try:

app.Microsoft_Excel.TypeKeys('^a')

You can get documentation on SendKeys mini-syntax here or here.