Last active
October 3, 2022 13:14
-
-
Save kisst/074894573cea7f4e697c08337b5c4deb to your computer and use it in GitHub Desktop.
One directional VDI proof "copy/paste"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Type the content of the file given in parameter | |
""" | |
import time | |
import sys | |
import pyautogui | |
# validate that we have something to type | |
if not len(sys.argv) == 2: | |
print("Error, no filename given or too many parameters") | |
print(len(sys.argv)) | |
sys.exit() | |
# give a chance for the user to change window | |
for cv in range(3, 0, -1): | |
print(cv) | |
time.sleep(1) | |
print("Typing away...") | |
# main loop | |
with open(sys.argv[1]) as f: | |
lines = f.readlines() | |
for line in lines: | |
pyautogui.typewrite(line) | |
print("Done") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the way back just use normcap https://github.com/dynobo/normcap