问题
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.
回答2:
U can use: send_keys('^a')
来源:https://stackoverflow.com/questions/12056590/how-to-press-ctrl