My code is:
import win32api, win32con shell = win32com.client.Dispatch("WScript.Shell") shell.SendKeys("{DELETE}") shell.SendKeys("{DEL}") nothing happens when it works
what am I doing wrong?
My code is:
import win32api, win32con shell = win32com.client.Dispatch("WScript.Shell") shell.SendKeys("{DELETE}") shell.SendKeys("{DEL}") nothing happens when it works
what am I doing wrong?
There is such a module pyautogui .
The example below will enter '12390' , then delete the last two digits and add '45' :
# pip install pyautogui import pyautogui pyautogui.typewrite('12390') import time time.sleep(0.5) pyautogui.press('backspace') # Вариант клика 1 pyautogui.typewrite(['backspace']) # Вариант клика 2 pyautogui.typewrite('45') Source: https://ru.stackoverflow.com/questions/854189/
All Articles
shell.sendKeys(Keys.DELETE);But it cannot work to remove the input text, you must useshell.sendKeys(keys.BACKSPACE);- Let's say Pie