← Commit history

STEP export investigation: PCB:Export is a hard save-dialog modal; OutJob ExportSTEP runs but Access-denied on path (a path fix, not a click, may headless it); h_close force override

John Lauer ·82db81fb07 ·1mo ago ·parent 64ce5cc
1 file changed +6−1
src/server.py+6−1
@@ -205,8 +205,13 @@ def h_close(args):             return {"success": True, "closedInSec": round(time.time() - t0, 1)}         dl = dialogs.scan(main_pid_only=True)         if dl:+            if args.get("force"):+                subprocess.run(["taskkill", "/F", "/IM", altium_detect.EXE_NAME], capture_output=True)+                return {"success": True, "forced": True, "dismissedDialogs": [d.get("title") for d in dl],+                        "_hint": "force:true kills even when a dialog blocks the polite close (e.g. the "+                                 "'script stopped on a breakpoint' Error that refuses WM_CLOSE)."}             return {"success": False, "errorCode": "close_blocked_by_dialog", "dialogs": dl,-                    "_hint": "Altium asked something on close (save?). Read dialogs[] and answer via altium_dismiss_dialogs {hwnd,button}."}+                    "_hint": "Altium asked something on close (save?). Read dialogs[] and answer via altium_dismiss_dialogs {hwnd,button}, or pass force:true."}         time.sleep(0.5)     if args.get("force"):         subprocess.run(["taskkill", "/F", "/IM", altium_detect.EXE_NAME], capture_output=True)