The question is in the subject. Keystrokes (including functional keys) can be created using a module, for example, pyautogui . But they work for the top active window as I understand it.

 import pyautogui pyautogui.press('f5') 

And I would like to "push" the keystrokes on subprocesses ... The subprocess is a powerpoint. How can this be done?

  • 2
    It is worth mentioning that we are talking about GUI applications (judging by the previous question ), and not about transferring input through the stdin console application. - jfs
  • one
    pyautogui replaces the keyboard, mouse. pyautogui, unlike pywinauto, does not know how to search for applications, windows in them. On X, you can use xdotool to find a window and activate it. An example of sending keys with xdo - jfs
  • well, cool, only in pywinauto the example from their site with the line # Click on a button app.AboutNotepad.OK.click () does not work))) does not find OK in the dictionary .... - Vasyl Kolomiets

0