<span class="value">
import time<br>from ctypes import *<br><br># Load up the Win32 APIs we need to use.<br>GetForegroundWindow = windll.user32.GetForegroundWindow<br><br><br>foreground_window = GetForegroundWindow()<br><br><br><br><br><br>this is a part of a code I from a separate project.
<br><br><br>I am trying to find out it's possible to do this:<br><br>handle = gesomethingfromthefocusedwindow()<br><br>later when I want to do this:<br><br>handle.gainfocus()<br><br><br>and zap that window to the front!
<br></span>