From 692d317a34294296a723bdc224e81549e5679d61 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 6 Aug 2022 10:07:56 +0300 Subject: [PATCH] Wait for control focus --- night.ahk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/night.ahk b/night.ahk index 67ebd10..458e90f 100644 --- a/night.ahk +++ b/night.ahk @@ -1220,8 +1220,11 @@ $f::TrySelectCurrentMenuItem(CurrentMenu, "Move to Pre-Fader") || TrySelectCurre $q:: CloseCurrentMenuAndSend("{Enter}") - ControlSetText % "Edit1", % "-oo", A - ControlSend % "Edit1", % "{Enter}", A + if (!(Focus := WaitFocusedControl("^Edit1$", "A", 5, 1000))) { + return + } + ControlSetText % Focus, % "-oo", A + ControlSend % Focus, % "{Enter}", A return $r::TrySelectCurrentMenuItem(CurrentMenu, "Use Default Send Level")