I get the active window like so:
window = win32gui.GetForegroundWindow()
which is an Int, say 1053634. And afterwards I try to set the foreground window back to the specified window:
win32gui.SetForegroundWindow(window)
And I get this error: win32gui.SetForegroundWindow(window) error: (127, 'SetForegroundWindow', 'The specified procedure could not be found.')
Sometimes when I do this in the interpreter, I get this error:
win32gui.SetForegroundWindow(1053634)
error: (0, 'SetForegroundWindow', 'No error message is available')
What do you think is the problem?
Thanks!