Hello Guys, Today we will learn about How to send keystrokes to windows exe program using pyautogui module and using win32api.
If you want to friendship with a girl and you want to impress with your program and ask for friendship. Or if you want to all your daily computer work done automatically. Then you can also use python script.
For Example:
import time
import win32com
import win32com.client
import pyautogui
shell = win32com.client.Dispatch('WScript.Shell')
shell.Run('notepad')
time.sleep(0.1)
shell.AppActivate('notepad')
while True:
mm = pyautogui.typewrite('Hello Akan!, Will you friendship with me? If yes then tell me.', interval=0.25)
pyautogui.press('enter')
pyautogui.typewrite('Your Wellwisher :)', interval=0.25)
shell.SendKeys("mm",0)
shell.SendKeys("{Enter}", 0)
shell.SendKeys("{F5}", 0) # F5 prints the time/date
pyautogui.press('enter')
The above programe need some requirment:
Using pyautogui, You are able to handle all keyboard functionality. Read full Documentation about pyautogui:pyautogui Documentation
Using pyautogui you can also create a amaging program. You can handle your daily same computer work just a one click. If you want to convert your program in exe. You can also use pyinstaller.
Thank You for reading this article.I hope this article helpful for biginners and newbie who do not know about sending keystrokes to Windows exe Program. If any query please comment. And also like my FB page givin below link and share it.
Kryptora Digital Security Provided Python Training and Ethical Hacking Training- Best Python Training in Noida
- Best Python Training in Delhi
- Best Python Training in Meerut
- Best Python Training in India
- Best Ethical Hacking Training in Noida
- Best Ethical Hacking Training in Delhi
- Best Ethical Hacking Training in Meerut
- Best Ethical Hacking Training in India
Follow ManishHacker1
Comments
Post a Comment