Programmatically operate keyboard and mouse
pip install pillow
In advance
pyautogui.py
# -*- coding: utf-8 -*-
import pyautogui
screenWidth, screenHeight = pyautogui.size()
currentMouseX, currentMouseY = pyautogui.position()
pyautogui.moveTo(50, 270)
pyautogui.click()
pyautogui.typewrite('print "Hello world!"', interval=0.25)
I took a video but couldn't upload it to Twitter, so I'll post the code.
output.py
# -*- coding: utf-8 -*-
import pyautogui
screenWidth, screenHeight = pyautogui.size()
currentMouseX, currentMouseY = pyautogui.position()
pyautogui.moveTo(50, 270)
pyautogui.click()
pyautogui.typewrite('print "Hello world!"', interval=0.25)
print "Hello world!"
Recommended Posts