Reputation: 6427
I am using AutoIt for and I have the following code running as console application.
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;
}
}
But my problem is that if no user is logged in to the machine the process unable to get correct answer from au3.WinExists() and it always says that the windows doesn’t exist.
Any Idea how this code will work also if no user logged in to the machine
This is Vm .
Upvotes: 0
Views: 867
Reputation: 20199
AutoIt cannot do many things, particularly the Win*
methods, if the computer is not logged in or the desktop is locked.
Upvotes: 3