I'm looking for a way to set the active window. The only solutions I found are outdated. They included modules like pywinauto
but its focus()
function doesn't work.
I need something that quickly switches/makes another window active.
I tried the code below, but it doesn't work as it says object has no attribute 'focus'
import pygetwindow as gw
win = gw.getWindowsWithTitle('Photoshop')[0]
win.focus()
I am using Windows 8