프로그래밍언어/Python
Python) 메모장에 텍스트보내기 파이썬3내장 ctypes
부산딸랑이
2014. 11. 6. 11:38
import ctypes
#winapi 함수들선언
SendMessage = ctypes.windll.user32.SendMessageW
FindWindow = ctypes.windll.user32.FindWindowW
FindWindowEx = ctypes.windll.user32.FindWindowExA
#Edit자식핸들구해서 SendMessage까지
hNote = FindWindow("Notepad", None)
hNoteEdit = FindWindowEx(hNote, 0, b'Edit', None)
res = SendMessage(hNoteEdit, 0xC, 0, "테스트중이에요 뿌잉뿌잉")