Automating keystrokes and actions in Windows
I want to be able to either record key strokes or enter them in manually and be able to replay them.
For example:
Copy
-
Manually highlight the text I want to copy.
-
Ctrl+C
-
Alt+Tab
Manually position the cursor where I want to paste the text. -
Ctrl+V
-
Alt+Shift+F10
-
T
This would allow me to copy text into MS Word and set the formatting of the text.
Are there any tools for this?
AutoHotKey can be used to make hotkeys that do what you want. It even has a recorder to ease the process of creating your script.
Here's a quick example I threw together based on what you're trying to do:
; The X, Y coordinates inside your target window to click for pasting
targetX = 0
targetY = 0
!^v::
{
Send, {CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}
WinWait, Microsoft Word,
IfWinNotActive, Microsoft Word, , WinActivate, Microsoft Word,
WinWaitActive, Microsoft Word,
MouseClick, left, %targetX%, %targetY%
Sleep, 100
Send, {CTRLDOWN}v{CTRLUP}
Send, {ALTDOWN}{SHIFTDOWN}{F10}{SHIFTUP}{ALTUP}{SHIFTDOWN}t{SHIFTUP}
}
This script makes Ctrl + Alt + V a hotkey that executes the above script.
Check out AutoIt