Import aus Monorepo (frischer Start)
This commit is contained in:
27
debug_window.py
Normal file
27
debug_window.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Debug: Zeigt alle Elemente im Error-Fenster"""
|
||||
import win32gui
|
||||
|
||||
def dump_window(hwnd, indent=0):
|
||||
try:
|
||||
class_name = win32gui.GetClassName(hwnd)
|
||||
text = win32gui.GetWindowText(hwnd)
|
||||
print(" " * indent + f'[{class_name}] "{text}" (hwnd={hwnd})')
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
def callback(child_hwnd, _):
|
||||
dump_window(child_hwnd, indent + 4)
|
||||
win32gui.EnumChildWindows(hwnd, callback, None)
|
||||
except:
|
||||
pass
|
||||
|
||||
hwnd = win32gui.FindWindow(None, "Error")
|
||||
if hwnd:
|
||||
print(f"Fenster gefunden: hwnd={hwnd}\n")
|
||||
dump_window(hwnd)
|
||||
else:
|
||||
print("Kein Fenster mit Titel 'Error' gefunden!")
|
||||
print("Bitte Fehlerfenster öffnen und nochmal ausführen.")
|
||||
|
||||
input("\nEnter zum Beenden...")
|
||||
Reference in New Issue
Block a user