0

我正在使用 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() 获得正确答案,并且它总是说 Windows 不存在。

如果没有用户登录到机器,任何想法也将如何工作

这是 Vm 。

4

1 回答 1

3

AutoIt 不能做很多事情,尤其是Win*方法,如果计算机没有登录或桌面被锁定。

于 2012-05-01T18:31:39.333 回答