This is a weird one... so I have a program to automate a very tedious task that has to be done each day at work, and it's through a RDP session (the app runs on my PC). Suddenly, it stopped working. The RDP is no longer accepting the input. It makes the | cursor flash, so it's doing something, but not the proper keys. In the terminal (proprietary app) it shows up as giberish. So it's like if it's not sending the proper input and it's not translating through. My app has not changed, yet it stopped working.
This is the function used to send keys:
Is there any reason why it would not work through RDP? I even tried to up the delay to like 300ms, still no go. I'm wondering if it's some kind of windows update that broke it. Is there a better way to do it? Worse case scenario I may have to make a mechanical bot of sort that sits on top of the keyboard. I want to avoid actually having to do that, there's got to be a way...
This is the function used to send keys:
Code:
void PressKey(byte key,int delay)
{
Core->Sleep(delay/2);
keybd_event( key,0, KEYEVENTF_EXTENDEDKEY | 0,0 );
Core->Sleep(delay/2);
keybd_event( key,0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0 );
}
Is there any reason why it would not work through RDP? I even tried to up the delay to like 300ms, still no go. I'm wondering if it's some kind of windows update that broke it. Is there a better way to do it? Worse case scenario I may have to make a mechanical bot of sort that sits on top of the keyboard. I want to avoid actually having to do that, there's got to be a way...