본문 바로가기
코딩

pyautogui를 활용하여 hello world 자동화를 해보자.

by 노마드랩스 2023. 2. 8.
728x90
반응형

메모장을 열어서, hello world! 라고 자동으로 작성해주는 코드입니다.

 

import pyautogui
import time

# Open Notepad
pyautogui.hotkey('win', 'r')
pyautogui.typewrite('notepad\n')

# Wait for Notepad to open
time.sleep(2)

# Type "Hello, World!" into Notepad
pyautogui.typewrite("Hello, World!")

728x90
반응형

댓글