     if (g_Conf.Config.ClearInputWithEsc && g_CurrentInput != "")
     {
         GoSub, ClearInput
-        return
-    }
-
+    }
+    else
+    {
+        GoSub, HideOrExit
+    }
+return
+
+HideOrExit:
     ; 如果是后台运行模式，只关闭窗口，不退出程序
     if (g_Conf.Config.RunInBackground)
     {

ToExit:
    if (!WinExist("RunZ.ahk"))
    {
        GoSub, EscFunction
    }

    SetTimer, ToExit, Off


    if (g_Conf.Config.RunOnce && !g_UseDisplay)
    {
        GoSub, HideOrExit
    }

    if (g_ExecInterval > 0 && splitedOriginCmd[1] == "function")
