0

I am trying to make macro with python

How can I send key event to inactive

Window?

3
  • You can't. Simple as that. If you want to automate an application, use UI Automation. Commented Jul 13, 2020 at 16:57
  • Actually win32api.SendMessage worked Commented Jul 16, 2020 at 9:57
  • This is another case of ignoring the difference between "correct code" and "code, that has not yet failed". Your code is in the latter category. Here's why. Commented Jul 16, 2020 at 10:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.