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)

<< < (4/9) > >>

Ath:
Another update and now WinSendKeys 2.5 is released

Latest release & download moved to separate thread

The changelog for 2.5 since the previous release, copied from the script:
; 2011-01-29, version 2.5-beta
; + Added -f strokesfile option to read keystrokes and mousestrokes from named file,
;            commandline strokes are handled first
; - Minor adjustments
; 2011-01-30, version 2.5
; ! Avoid ever overwriting the script with debug-log-file (if not .au3 or .exe extension, add .log to scriptname)
; + Added reading settings from optional .ini file:
;   Get parameters from .ini file with the same name as this script/exe, only if the file exists, create file manually!
;   Sectionname: [Settings]
;   Variables:
;   delay=100 : delay between keystrokes/mousestrokes sent to the application
;   mousestrokes=0 : Enable mousestrokes by setting this to 1
;   mousespeed=0 : Speedfactor for mouse move, value between 0 and 100, 0 = immediate, 1 = fast, 100 = slow
; - Documented and optimized script functions

Attachment includes AutoIt3 source, updated readme, a sample strokefile (.stro) and .exe

asihuay:
Hi to all.
I need example of full command line to send keystrokes to an excel vba userform1
I am trying  the following:
UserForm1.Show vbModeless
Shell "S:\WinSendKeys.exe -w:UserForm1 Tab"   'try to send   Tab key to UserForm1
Shell "S:\WinSendKeys.exe -w:UserForm1 a"   'try to send   "a"   to UserForm1
thanks in advance.

Ath:
Please re-read the readme file, it has samples and explanations, and weblinks to the key mnemonics to use.

Your sample could look something like this, assuming the title of your form really is 'UserForm1' :

--- ---Shell "S:\WinSendKeys.exe -w UserForm1 {TAB} a"   'try to send Tab key &&  "a"  to UserForm1

But eventually, Excel vba offers enough methods to control that dialog directly, you don't need an external tool for that.
Probably someone with more vba experience can help out here?

asihuay:
Thanks for the code.
Yes for control userform with vba is very easy I use it only to example in order to obtain the correct command line code.
My need are to open in default browser all network camera in sequence all are protected by user and password at this point I will use winsendkeys and then run snapshot(alt+S) then enter to take picture.
At this time I successfully obtain the required snapshot.
Thanks.

Ath:
Another update and now WinSendKeys 2.6 is released.

Latest release & download moved to separate thread

The changelog for 2.6 since the previous 2.5 release:
; 2011-02-07, version 2.6
; + Added -c option to read keystrokes from the clipboard, as requested by mouser & kikon in this thread: https://www.donationcoder.com/forum/index.php?topic=25553
; + Added -cn option, like -c, but does not send an {ENTER} after each line, can be added after -c or -cc to disable the {Enter} being sent
; + Added -cc option, like -c but embeds the clipboard into the KeyStrokes commandline sequence using #$ prefix, see readme for details

Attachment includes AutoIt3 source, updated readme, a sample strokefile (.stro) and .exe

(Edit: typo fixed)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version