For when Copy & Paste just won’t cut it
This script is designed to simulate keyboard key presses in order to type out (rather then paste) the current clipboard.
The inspiration for this script came from a need to paste into fields that cannot normally be pasted into, e.g. an RDP session, particularly when asked for the windows password or resetting one.
Usage:
- Copy the text you want to paste to the clipboard.
- Run the script (a command-line window will appear)
- Select the text field you want to paste in to
- After X seconds, the text will be typed out and the command-line window will close
The duration between the script starting and the clipboard being typed can be customised with the WAIT_TIME variable below.
This value should be long enough so that you can give focus to the text field you want it to type into after running the script.
Creating a shortcut:
It is possible to run the script via a keyboard shortcut.
- Create a shortcut (e.g. on the desktop)
- For the target: ‘<path to Python executable> <path to this script>’
- For the shortcut key: Any key combination (the author uses ‘Shift + Alt + P’)
This script was developed for Windows-based machines and obviously requires python.
Also, full disclosure: I cobbled this together from a number of Stack Overflow posts (that I have since lost the link to).
|
|