Welcome Guest.   Make a donation to an author on the site August 28, 2014, 02:13:57 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Simple Commandline to send Keystrokes (WinSendKeys)  (Read 26139 times)
kikon
Participant
*
Posts: 19

View Profile Give some DonationCredits to this forum member
« Reply #25 on: February 11, 2011, 05:11:42 AM »

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.
NirCmd  very very slowly sends commands. Last year, I've tried it
Logged
Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #26 on: February 11, 2011, 06:24:41 AM »

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

helpctr.exe just started and nothing is pasted.

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).
Logged

Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #27 on: February 11, 2011, 06:26:14 AM »

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

Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #28 on: February 11, 2011, 02:56:18 PM »

Fired up a VMWare session with Windows XP in it and tested your scenario. That helpctr thingy is just a little slow to initialize Wink
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: http://www.donationcoder....rum/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.
« Last Edit: April 23, 2011, 10:58:34 AM by Ath; Reason: Re-routed to separate thread » Logged

kikon
Participant
*
Posts: 19

View Profile Give some DonationCredits to this forum member
« Reply #29 on: February 12, 2011, 12:14:09 PM »

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
Logged
kikon
Participant
*
Posts: 19

View Profile Give some DonationCredits to this forum member
« Reply #30 on: February 12, 2011, 12:37:32 PM »

... very useful tool  thumbs up
 for reach to any search box from one GUI such as FARR
Logged
Micha8583
Participant
*
Posts: 2

View Profile Give some DonationCredits to this forum member
« Reply #31 on: March 03, 2011, 03:45:28 AM »

Hi,
do I implement WinSendKeys.exe as a batch file (like .bat) in DOS or in a command window /dos window?
Double- clicking doesn't do it  Grin
Thanks,
Mike
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #32 on: March 03, 2011, 04:15:02 AM »

Micha: yes, you need to run WinSendKeys.exe from the command line to pass it arguments
Logged

Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #33 on: March 03, 2011, 04:24:56 AM »

Most likely you can configure a command to be executed behind either a button or on a program event. There you could enter an entire command-line for WinSendKeys to do it's useful job. Or if there's not enough space, pass it a keystroke file (using the -f option), or just create a batchfile that does the job.

[shameless plug]
Can be quite nicely combined with WinButtons, published as a coding snack by myself thumbs up
[/shameless plug]
« Last Edit: March 11, 2011, 04:22:04 PM by Ath; Reason: Added shameless plug for combination with WinButtons » Logged

Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #34 on: March 13, 2011, 10:41:06 AM »

OK, so I found a bug, all on my own thumbs up, oh well, maybe that's not so good after all tellme

The fix was small and easy, so here is another update WinSendKeys 3.0.2

Latest release & download moved to separate thread

Here's the changelog since 3.0.1:
; 2011-03-12, version 3.0.2
; ! BugFix in detecting an active application/window
; + Added application version to helpmessage
; * Minor cleanup
; * Adapted the helptext somewhat

The readme was cleaned-up a bit by removing the change history (it's in the source), the source and compiled exe are also included in the attachment
« Last Edit: April 23, 2011, 10:59:20 AM by Ath; Reason: Re-routed to separate thread » Logged

mouser
First Author
Administrator
*****
Posts: 33,279



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #35 on: March 13, 2011, 10:49:35 AM »

Nice to see you keep working on this utility Ath, I like it  thumbs up

One thing that would make it useable more easily from my tools (like FARR for example) would be if in addition to exename and windowname, if we could pass in the window HANDLE.
« Last Edit: March 13, 2011, 10:52:53 AM by mouser » Logged
Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #36 on: March 13, 2011, 10:52:27 AM »

Nice to see you keep working on this utility Ath, I like it  thumbs up

Besides me being convinced that all known bug should be "taken care of", I'm eagerly awaiting improvement suggestions... Cool
Logged

Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #37 on: March 13, 2011, 11:08:37 AM »

if we could pass in the window HANDLE.
I can take care of that tongue

Another feature request taken care of: WinSendKeys 3.0.3

Latest release & download moved to separate thread

The small changelog since 3.0.2:
; 2011-03-13, version 3.0.3
; * Improvement: A numeric WindowName is now treated as a WindowHandle (HWnd), as requested by mouser

Source, exe and readme included the attachment
« Last Edit: April 23, 2011, 10:59:55 AM by Ath; Reason: Re-routed to separate thread » Logged

mouser
First Author
Administrator
*****
Posts: 33,279



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #38 on: March 13, 2011, 11:23:48 AM »

nice! that was quick work.

Now you need a web page and a pad file so others can discover this.
Logged
Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #39 on: March 13, 2011, 11:26:36 AM »

Now you need a web page and a pad file so others can discover this.

The pad file I can take care of myself, but a site... If you could help out with that... smiley
Logged

mouser
First Author
Administrator
*****
Posts: 33,279



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #40 on: March 13, 2011, 11:30:59 AM »

We are always more than happy to provide web space on the member server -- delighted in fact.
Logged
Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #41 on: April 22, 2011, 04:02:53 PM »

A few minor fixes to WinSendKeys so I've got to release today:

WinSendKeys 3.0.4

This is the small changelog:
; 2011-04-22, version 3.0.4.0
; ! Bugfix for if -? was given for parameter. It's now handled properly.
; * Added version & info resource to compiled exe
; * Changed by adding #regions to allow code-folding for a little easier maintainability

Download attached to this post, and also available from latest release & download thread and my DcMembers server page

* WinSendKeys-3.0.4.zip (345.3 KB - downloaded 88 times.)
« Last Edit: April 23, 2011, 11:01:48 AM by Ath; Reason: Re-routed to separate thread » Logged

mouser
First Author
Administrator
*****
Posts: 33,279



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #42 on: April 22, 2011, 04:08:01 PM »

Great to see this continuing.  thumbs up
Might be better to not use the forum attachments for this -- otherwise old versions linger and people might download them by mistake?
Logged
wraith808
Supporting Member
**
Posts: 6,207



"In my dreams, I always do it right."

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #43 on: April 22, 2011, 06:08:47 PM »

Or maybe to make a unique thread for this, and keep updating the first post.
Logged

Ath
Supporting Member
**
Posts: 2,197



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #44 on: April 23, 2011, 02:47:30 AM »

Might be better to not use the forum attachments for this -- otherwise old versions linger and people might download them by mistake?

I have been using this marker in the older posts to try to avoid that:
Quote
Updated to a newer version, see further below!

Later today I'll restructure a new message and link to the DcMembers page I already have for this embarassed
And remove the attachments from the other messages (done). The latest is the greatest, ofcourse Cool

Just did that, rerouting all messages to latest release & download thread
« Last Edit: April 23, 2011, 11:03:21 AM by Ath; Reason: Re-routed to separate thread » Logged

Pages: Prev 1 [2]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.04 ]