#3 Pyautogui - Duas teclas simultaneamente

 avatar
user_7544414
python
23 days ago
481 B
1
Indexable
Never
import pyautogui
from time import sleep

pyautogui.click(728,63,duration=1)
# gambiarra
pyautogui.keyDown('ctrl')
pyautogui.keyDown('a')
pyautogui.keyUp('ctrl')
pyautogui.keyUp('a')
pyautogui.keyDown('ctrl')
pyautogui.keyDown('c')
pyautogui.keyUp('ctrl')
pyautogui.keyUp('c')


# melhor forma
pyautogui.hotkey('ctrl','a')
pyautogui.hotkey('ctrl','c')
pyautogui.hotkey('ctrl','shift','n')
pyautogui.click(728,63,duration=1)
sleep(1)
pyautogui.hotkey('ctrl','v')
Leave a Comment