WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sending Keystrokes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

SendKey Issue with GoToMyPc

 Keywords: SendKey SendKeysTo Issue Remote PC GoToMyPc 

Question:

Has anyone ever seen behavior where a script that successfully sends keystrokes to an app when run at the PC does not send the keystrokes when accessed through gotomypc? Because it happened to me last night. I spent four hours trying to figure out why I couldn't get keystokes into an app with Winbatch.

What is it that gotomypc does that hijacks the keyboard so that sendkeys does not work? Will this also affect compiled scripts?

Answer:

Well, there are two issues. If in a remote session, and the session is in a disconnected state. the keyboard is effectively disconnected from the program, EVEN IF the WinBatch script is running on the server. Sendkeys emulate the keyboard very well, and the system considers the keyboard disconnected from the application, so, well, no sendkeys. And if the the remote PC is connected, and the script is running on a remote machine where is the script sending the keystrokes. Its not sending them to the application on the remote machine, it is sending them to the gotomypc app on the local machine. That is the application that the local maxchine sees picking up the keystrokes, not your application running the remote machine. WinBatch is happiest running on the same machine that is running the application. So either arrange it so that your scripts run on the remote machine, or compile a script and put the compiled exe on the remote machine with the application. Otherwise you have to program the script for the communications link instead of the actual application, and that is not easy. Read...effectively impossible.
Article ID:   W18273
Filename:   SendKey Issue with GoToMyPc.txt
File Created: 2008:06:06:08:33:46
Last Updated: 2008:06:06:08:33:46