From 4f48b0f01db6f9050a154bb507f4767d5693467d Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 23 Aug 2023 16:13:33 +0100 Subject: [PATCH] add a configurable delay before launching nvda --- src/nvda_voicemeeter/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvda_voicemeeter/__init__.py b/src/nvda_voicemeeter/__init__.py index 863ba16..239fbdb 100644 --- a/src/nvda_voicemeeter/__init__.py +++ b/src/nvda_voicemeeter/__init__.py @@ -1,12 +1,14 @@ import subprocess as sp +import time from .cdll import NVDA_PATH from .window import request_window_object as draw -def launch(): +def launch(delay=1): if NVDA_PATH: sp.Popen([NVDA_PATH], shell=True) + time.sleep(delay) __ALL__ = ["launch", "draw"]