win32gui get the current active application name
问题 I am just learning python and I am relativity new to it. I created the following script that will get the current active windows title and print it to the window. import win32gui windowTile = ""; while ( True ) : newWindowTile = win32gui.GetWindowText (win32gui.GetForegroundWindow()); if( newWindowTile != windowTile ) : windowTile = newWindowTile ; print( windowTile ); The above code snippet works. I am now trying to get the application name for the active window ( Foreground Window ) My