From 343b00ceef784f1cb8c45a209047ef3073903032 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 6 Jan 2023 01:35:29 +0100 Subject: [PATCH] also specify the exe path --- config.yaml | 1 + src/sendkeys.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index ba7f950..33f0e70 100644 --- a/config.yaml +++ b/config.yaml @@ -3,6 +3,7 @@ General: log_level: 'DEBUG' after_sendkeys_key_wait: 0.001 # Amount of seconds to wait after a keypress. Default is 0.01 poe_window_title: 'Path of Exile' + poe_path: 'D:\\SteamLibrary\\steamapps\\common\\Path of Exile\\PathOfExileSteam.exe' Chat: # Define chat messages with the following placeholders: # message, date, channel, user, guild, to_from, item, amount, currency, tab, row, col, league, diff --git a/src/sendkeys.py b/src/sendkeys.py index 836efb4..8adbcb8 100644 --- a/src/sendkeys.py +++ b/src/sendkeys.py @@ -8,7 +8,7 @@ from src import config def send_text(text: str) -> None: app = Application() try: - app.connect(title=config.conf['General']['poe_window_title']) + app.connect(title=config.conf['General']['poe_window_title'], path=config.conf['General']['poe_path']) except ElementNotFoundError: data.log.warning(f'Window Title "{config.conf["General"]["poe_window_title"]}" not found') return