However you said this is a work computer and you may not be able to load a 3rd party program.. You can use Windows Scripting Host from something like a.
If you're running a version of Windows that includes PowerShell 2. The specifics of how to do it are outside the scope of this answer but you can find numerous examples using the methods I just described by searching on SO or Google. Mean this that you must learn a different programming language just to send two keys to the keyboard?
There are simpler ways for you to achieve the same thing. Now that i've a great menu using arrow keys, i need to center the window on the screen, is it possible?
If a adjust the window properties it works well, but after restart it's not centered. Posted 08 February - PM. Posted 13 February - PM. This version allows the caller to specify a list of phrases and returns the selection in the var variable.
Posted 14 February - AM. Not sure if it works in your WinPE, but you can also try these commands to change the console window. Posted 14 February - PM. I didn't try these tools. Here's an example. Adapt it to your needs:. This was nothing than an idea in hope it could be somehow implemented. Again, I never worked with this kind of menu. Therefore I'm not able to assist. Sorry for intruding your thread.
Posted 15 February - AM. Existing Members Sign in to your account. This email is in use. Do you need your password? Submit your solution! When answering a question please: Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome. Don't tell someone to read the manual.
Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid. Related Questions. Batch script to read multiple values from text file and assign into different variables. That could work. The script works, but I still get prompted to enter a password and press enter. I don't understand because I made the script so that it calls cmd and hits enter a bunch of times and that works fine but whenever that executable is called it doesn't seem to care.
I guess I should have also mentioned that it doesn't need to be a batch file either that's just was I was trying to do. Stuffing the keyboard buffer can be tricky if the executable flushes the keyboard buffer before waiting for a key. Then, no matter what you put in the buffer, it empties it and then asks for confirmation.
You can test this by running the program and trying to type-ahead your response. If you hit enter really fast does it accept the keystroke or still wait? The way a classic keyboard flush works is that is reads characters until it is told there are no more. If you put in 2 or 10 Enters, it will pull them all out and then move on.
Here's a link to someone who stuffed the buffer with a delay that was long enough to get past the flush. Don't know if it will give you any ideas. I'd have to try this to be sure, but you could have your batch file spawn off another batch file that had a delay, then stuffed the buffer.
Meanwhile, your original program could continue to launch the executable. It would look like this. Batch script cannot send keys to external windows. Vbs can, but you're already using it.
0コメント