Live 30.10.: ESC at 11:03:09 set all stop files, yet the runner clicked "max" and "buyin" at 11:03:12 - stellen_klicken checked only before a sequence, the mouse path never, and cleanup clicked sitout/cross "trotz_stopp". hand/notaus.py is now the one source for the stop files (act, click, stopp); click.click checks before start, on every movement step and before pressing (KlickNotAus), pid_klick too, sequences check before each click, trotz_stopp no longer overrides Not-Aus, dialog.esc sends no key and the live pointer stops. The runner logs "nicht geklickt (Not-Aus)" instead of a sitout it did not do. The header counted every window of a table process (table + dialog = 2); it now counts rooms from the process list. Tests get their own stop folder (POKERFREAK_STOPP_ORDNER) so they never see or touch the machine's Not-Aus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
"""Not-Aus: ist er gesetzt, geht keine Eingabe mehr raus - keine Mausbewegung, kein Klick, keine Taste.
|
|
|
|
Die Dateien schreibt das Cockpit (mac/Sources/CockpitKern/Fenster.swift, mcp/stopp.py); eine
|
|
genügt. Gefragt wird vor jedem Klick und bei jedem Schritt einer Mausbewegung (hand/click.py) -
|
|
live 30.10. klickte der Läufer 3 s nach ESC noch "max" und "buyin". Spezifikation: tests/notaus_spec.py.
|
|
"""
|
|
import os
|
|
|
|
_w = os.path.dirname(os.path.abspath(__file__))
|
|
while _w != "/" and not os.path.isdir(os.path.join(_w, "hand")):
|
|
_w = os.path.dirname(_w)
|
|
WURZEL = _w
|
|
|
|
# POKERFREAK_STOPP_ORDNER: eigener Ordner (tests/lauf.py) - Tests sehen den Not-Aus dieses Rechners
|
|
# nicht und setzen oder löschen ihn nie.
|
|
_ORDNER = os.environ.get("POKERFREAK_STOPP_ORDNER")
|
|
PFADE = [os.path.join(_ORDNER, "stop")] if _ORDNER else [
|
|
os.path.join(WURZEL, "scratch", "stop"),
|
|
os.path.join(WURZEL, "hand", "scratch", "stop"),
|
|
os.path.join(WURZEL, "betrieb", "scratch", "stop"),
|
|
]
|
|
|
|
|
|
def aktiv():
|
|
"""Ist der Not-Aus gesetzt (irgendeine der Dateien da)?"""
|
|
return any(os.path.exists(p) for p in PFADE)
|