Skip to content

Instantly share code, notes, and snippets.

@wonsolution
Last active August 6, 2020 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wonsolution/8fed2d1a5f681a253ece84611aa557ad to your computer and use it in GitHub Desktop.
Save wonsolution/8fed2d1a5f681a253ece84611aa557ad to your computer and use it in GitHub Desktop.
import pyautogui, sys
from time import sleep
import pyperclip
pyautogui.click(100,500)
//------------------한 음절씩 입력하는 코드
pyperclip.copy("안")
pyautogui.hotkey("ctrl","v")
sleep(0.5)
pyperclip.copy("녕")
pyautogui.hotkey("ctrl","v")
sleep(0.5)
pyperclip.copy("하")
pyautogui.hotkey("ctrl","v")
sleep(0.5)
pyperclip.copy("세")
pyautogui.hotkey("ctrl","v")
sleep(0.5)
pyperclip.copy("요")
pyautogui.hotkey("ctrl","v")
sleep(0.5)
//-----------------------문장을 입력하는 코드
pyautogui.click(100,500)
a = "안녕하세요"
for i in range(0,5):
pyperclip.copy(a[i])
pyautogui.hotkey("ctrl", "v")
sleep(0.5)
print(a)
//--------------------------파일을 불러들여 한 줄씩 읽어 한 음절씩 나타나게 하는 코드
pyautogui.click(100,500)
f = open("인사.txt", 'r', encoding='UTF8')
while True:
line = f.readline()
for i in range(len(line)):
pyperclip.copy(line[i])
pyautogui.hotkey("ctrl", "v")
sleep(0.5)
if not line: break
print(line)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment