Need batch file help sending keys

October 17, 2010 at 15:58:22
Specs: Windows XP
I'm trying to write a batch file that will send keystrokes to notetab pro. What keys I need sent are to: Ctrl+Shift T > Copy all > Exit

Can someone help me with what commands you would need in the batch file to send those keys? Thanks.


See More: Need batch file help sending keys

Report •


#1
October 17, 2010 at 18:00:12
Batch files barely know windows exists. You would be better of with a vbscript.

Can I put a question here?


Report •

#2
October 17, 2010 at 18:05:51
Ok I see. What would the vb commands be to do that? I'm assuming that you write a vb script for those commands and then call the vb script from inside the .bat file?

Report •

#3
October 18, 2010 at 00:08:06
You should have a look at: NirCMD

http://www.nirsoft.net/utils/nircmd...

Nircmd.exe sendkey a press
(presses a)

In the following script example, the system behaves like the user presses Shift+Ctrl+Esc (the task manager should appear):

nircmd.exe sendkey shift down
nircmd.exe sendkey ctrl down
nircmd.exe sendkey esc down
nircmd.exe sendkey shift up
nircmd.exe sendkey ctrl up
nircmd.exe sendkey esc up

You also have special Virtual key codes.
(For example: 0x2e for Delete key)

nircmd.exe sendkey 0x2e press

Google for virtual key codes.

http://nircmd.nirsoft.net/sendkey.html

Regards,

MUs

Happy is ONE who says I am an OttoMAN.


Report •

Related Solutions

#4
October 18, 2010 at 12:26:29
MUs solution will work, but you have to download something.

----

Also, I'm not very good with vbs. So if you want to take that road, Somebody else on this forum will be have to help.

My apologies, and good luck.

Can I put a question here?


Report •

#5
October 18, 2010 at 12:40:01
Ok I just read that post. I did a test run on opening the task manager and it worked. Still trying to figure out how to send the keys to notetab pro.

Report •

#6
October 18, 2010 at 13:28:11
Hi,

"but you have to download something."
We do all time :)

"Still trying to figure out how to send the keys to notetab pro."
Open notetad pro and sendkey after?

@echo off
start C:\"Program Files"\NotetadPro\NotetadPro.exe
nircmd.exe wait 5000
nircmd.exe sendkey t press
nircmd.exe wait 1000
nircmd.exe sendkey h press
nircmd.exe wait 1000
nircmd.exe sendkey i press
nircmd.exe wait 1000
nircmd.exe sendkey s press
nircmd.exe wait 1000
nircmd.exe sendkey 0x20 press
nircmd.exe wait 1000
nircmd.exe sendkey i press
nircmd.exe wait 1000
nircmd.exe sendkey s press
nircmd.exe wait 1000
nircmd.exe sendkey 0x20 press
nircmd.exe wait 1000
nircmd.exe sendkey a press
nircmd.exe wait 1000
nircmd.exe sendkey 0x20 press
nircmd.exe wait 1000
nircmd.exe sendkey t press
nircmd.exe wait 1000
nircmd.exe sendkey e press
nircmd.exe wait 1000
nircmd.exe sendkey s press
nircmd.exe wait 1000
nircmd.exe sendkey t press
msg * Script ended
exit

Virtual Key Code of space bar = 0x20

(Virtual key codes) - http://www.kbdedit.com/manual/low_l...

Regards,

MUs

Happy is ONE who says I am an OttoMAN.


Report •

#7
October 18, 2010 at 13:57:42
Ok excellent. Thank you very much for all your help. I've gotten this step to work. You guys have been a tremendous help, thank you.

Report •

#8
October 18, 2010 at 15:18:12
You're welcome.

Happy is ONE who says I am an OttoMAN.


Report •


Ask Question