import pywinauto.application import pywinauto.handleprops as _handleprops import pywinauto.win32functions as _win32functions import time while 1: hwnd = _win32functions.GetForegroundWindow() print "Active Window title is %s"%(_handleprops.text(hwnd)) print "Application name is %s"%(pywinauto.application.process_module(_handleprops.processid(hwnd))) time.sleep(2)
~ts
No comments:
Post a Comment