AutoIt-WinExist在没有用户登录计算机时无法正常工作

本文关键字:常工作 工作 用户 计算机 登录 AutoIt-WinExist | 更新日期: 2023-09-27 18:32:59

我正在使用AutoIt,并且我有以下代码作为控制台应用程序运行。

public static class CustomerManager
{
    public static bool IsCustomerInSession()
    {
        AutoItX3 au3 = new AutoItX3();
        if (au3.WinExists("Request Desktop Control", "There are no customers in the session.  Please invite or wait for customer to join the session.") == 0)
            return true;
        else
            return false;
    }
}

但我的问题是,如果没有用户登录到机器,则该过程无法从中获得正确答案AU3.WinExists() 并且它总是说窗口不存在。

任何想法 如果没有用户登录到计算机,此代码也将如何工作

这是 Vm .

AutoIt-WinExist在没有用户登录计算机时无法正常工作

如果

计算机未登录或桌面已锁定,AutoIt 无法执行许多操作,尤其是Win*方法。