ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Simple Commandline to send Keystrokes (WinSendKeys)

<< < (6/9) > >>

kikon:
Looks like NirCmd might be able to do it.  At least, it has "sendkey" type commands, but it doesn't seem to specify a target program or window.-rjbull (January 24, 2011, 04:57 PM)
--- End quote ---
NirCmd  very very slowly sends commands. Last year, I've tried it

Ath:
thank you Ath, but -x doesn't work yet. I used in various way, doesn't work :(
d:\run\WinSendKeys\WinSendKeys.exe -x C:\WINDOWS\pchealth\helpctr\binaries\helpctr.exe -c

helpctr.exe just started and nothing is pasted.
-kikon (February 10, 2011, 05:21 PM)
--- End quote ---

Does it react to input directly after starting, or does it need some time to initialize before the paste/send action is accepted? That's currently not accounted for.
And is the focus initially in the correct (input)control? Maybe you'd need a bit of the MouseStroke options to guide the focus into the right place. Details for that are in the readme. (Handling-order is 1) Commandline parameters, 2) -f strokesfile, 3) -c clipboard contents).

Ath:
Oh, I tested -x using Notepad, as I don't have the software you're using.

Ath:
Fired up a VMWare session with Windows XP in it and tested your scenario. That helpctr thingy is just a little slow to initialize ;)
Used -xd 2000 and all was pasted fine. but you might need to tweak that experimentally.

Without further delays: Another update WinSendKeys 3.0.1

Latest release & download moved to separate thread

The readme has this changelog since 3.0:
; 2011-02-11, version 3.0.1
; + Added -xd delay option to wait after running the -x executable_filepath. It already has the delay of -t (100 msec), and this is added when specified. Experiment with the required delay (milliseconds).
;   as additionally requested by kikon in this thread: https://www.donationcoder.com/forum/index.php?topic=25553
; + This delay can be preset in the optional inifile, (see version 2.5 changelog)
;   Variable:
;   exedelay=0
; ! Updated helpmessage, fixed some readme typos

As usual, I updated the readme, compiled the AutoIt3 source into an exe, and put it all in a zipfile, attached to this post.

kikon:
Hi,Ath ! many thanks  :Thmbsup: good launcher tool ! I've used these lines, both works .

WinSendKeys.exe -c -t 1000 -x helpctr.exe
WinSendKeys.exe -c -xd 1000 -x helpctr.exe

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version