Automated Keystrokes for 'x' seconds

November 29, 2010 at 13:05:40
Specs: Macintosh or Windows XP/7
Is it possible via script to have 'x' key held down for 'y' seconds, and then 'x2' key held down sequentially for 'y2' seconds? Basically, need to automate keystrokes, but they need to be held for a certain time consecutively. I have no idea what language would be used or how to do it. Can you point me in the right direction?

See More: Automated Keystrokes for x seconds

Report •


#1
November 29, 2010 at 13:53:19
You can do it with batch-scripting;

BUT, this command line tool ISNT built in, so you have to download it.

In this example it does hold down the keys a, b and c for 5 seconds, then it does release it.

::AUTOMATED_KEYSTROKES.BAT
@echo off
nircmd sendkey a down
nircmd sendkey b down
nircmd sendkey c down
nircmd wait 5000
nircmd sendkey a up
nircmd sendkey b up
nircmd sendkey c up
pause
exit

NirCMD can you download at; http://www.nirsoft.net/utils/nircmd...

Regards,

Happy is ONE who says I am an OttoMAN.


Report •

#2
November 29, 2010 at 14:59:36
Thanks, that's what I was looking for. Is there any way to get it to start upon an event? For example
(start script by running the .bat file)
-----
*wait for mouse click*
(mouse clicks)
*script start)
nircmd....


Does that make sense?


Report •

#3
November 29, 2010 at 23:57:34
You can send left/right mouse clicks with NirCmd, but you cant determine, if the mouse clicked, then do something.

My englisch isnt perfect, so I hope you understand me :)

Regards,

Happy is ONE who says I am an OttoMAN.


Report •

Related Solutions

#4
November 30, 2010 at 04:19:46
No problem, it's understandable :)
Thanks for your help.

Report •

#5
November 30, 2010 at 08:53:45
You're welcome :)

Happy is ONE who says I am an OttoMAN.


Report •


Ask Question