L
L
leham12020-05-24 22:32:37
Python
leham1, 2020-05-24 22:32:37

How to focus another window?

Hello.
Can you please tell me how to focus the window of an open program?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lightmanLP, 2020-05-24
@leham1

pygetwindow library

B
BasiC2k, 2020-05-25
@BasiC2k

Via WinAPI:
1. Find the required window (or rather, its handle);
2. Make the window active;
3. Give him focus.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question