Jul-29-2022, 10:29 AM
You can try this, but renaming the name of the application breaks it.
from tkinter import Tk, Label, Button from tkinter.messagebox import showwarning # pip install psutil from psutil import process_iter def recording_observer(root): forbidden = ["obs.exe", "obs64.exe"] for process in process_iter(): if process.name() in forbidden: root.withdraw() showwarning("Recoding", "Recording is not allowed") break else: root.deiconify() root.after(1_000, lambda: recording_observer(root)) root = Tk() Label(root, text="Hello World").pack() Button(root, text="Close", command=root.destroy).pack() recording_observer(root) root.mainloop()
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!