mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-07 02:43:22 +03:00
Split enumwindowsproc() conditional into multiple lines
This commit is contained in:
parent
bf7e21a94f
commit
1714219c17
@ -120,10 +120,10 @@ if __name__ == '__main__':
|
|||||||
def enumwindowsproc(window_handle, l_param):
|
def enumwindowsproc(window_handle, l_param):
|
||||||
# class name limited to 256 - https://msdn.microsoft.com/en-us/library/windows/desktop/ms633576
|
# class name limited to 256 - https://msdn.microsoft.com/en-us/library/windows/desktop/ms633576
|
||||||
cls = ctypes.create_unicode_buffer(257)
|
cls = ctypes.create_unicode_buffer(257)
|
||||||
if GetClassName(window_handle, cls, 257) \
|
if GetClassName(window_handle, cls, 257):
|
||||||
and cls.value == 'TkTopLevel' \
|
if cls.value == 'TkTopLevel':
|
||||||
and window_title(window_handle) == applongname \
|
if window_title(window_handle) == applongname:
|
||||||
and GetProcessHandleFromHwnd(window_handle):
|
if GetProcessHandleFromHwnd(window_handle):
|
||||||
# If GetProcessHandleFromHwnd succeeds then the app is already running as this user
|
# If GetProcessHandleFromHwnd succeeds then the app is already running as this user
|
||||||
if len(sys.argv) > 1 and sys.argv[1].startswith(protocolhandler_redirect):
|
if len(sys.argv) > 1 and sys.argv[1].startswith(protocolhandler_redirect):
|
||||||
CoInitializeEx(0, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)
|
CoInitializeEx(0, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user