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.

Interaction with Multiple Users in XP

Keywords:   Sendkeys XP switch users

Question:

I just installed winbatch for my xp system. You know how you can switch between users in XP? I wanted to get winbatch to run in each user login. I tested a few scripts, but winbatch will only launch programs, it would not do the "sendkey" command and "mouseplay" command. I wish it worked. It would be the equivalent of having as many computers as you please(with computing capacity constraints). Does anyone know how to do this? Or does winbatch need to somehow incorporate this feature?

Answer:

Almost.

The Winbatch Sendkey is (almost) exactly like the keyboard.. The keyboard goes to the active session. Period. So does sendkey.

So you cannot start a sendkey process and then switch the keyboard away from thet process.

That said, however, you can still do an awful lot without using Sendkey. It kinda depends what yu want to do.

First off would be RoboScripter and the Control Manager extender (if you avoid the SendKey choices in RoboScripter)

Next, a lot of more intelligent applicaitons respond to OLE, and you can do a lot of work with OLE.

Anyway it seems like a good idea....but no Sendkey.

It should be noted that this restriction in how SendKey() and SendKeysTo() is imposed by WinNT, Win2K and WinXP. It has to do with how windowstations and desktops work at a very low level. There is only a single desktop that is "active" w/respect to receiving input from the physical keyboard & mouse that are present on the system console.

Terminal Server sessions are slightly different in that they have their own separate windowstations & desktops and they are connected [via terminal services] to the keyboard & mouse on the client computer that runs the terminal services client.


Article ID:   W15296
File Created: 2002:09:05:13:51:08
Last Updated: 2002:09:05:13:51:08