asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.12k stars 1.23k forks source link

Can't move the mouse after right click #261

Open kerolan opened 6 years ago

kerolan commented 6 years ago

import pyautogui

pyautogui.rightClick(100,100) pyautogui.moveRel(20,20) # don't work

What should I do?

kerolan commented 6 years ago

my env: https://gyazo.com/8bf72407062a0081cc1c5105a3213528

on windows 10

kerolan commented 6 years ago

sorry... it works.

kerolan commented 6 years ago

I can not move even by right clicking on the Private Internet Access VPN icon on the task bar.

https://gyazo.com/35a85da515a3b685484aa90bddca762c https://www.privateinternetaccess.com/

aa3222119 commented 5 years ago

on win10 , i can't even move mouse after one left click.

res = pag.locateOnScreen('F:\python_pro\MLprocess\ie.png', confidence=0.9) if res:

pag.moveRel(45,0)
pag.moveTo(res[0]+.5*res[2], res[1]+.5*res[3])
pag.click()
pag.moveTo(45, 45) # not work
pag.click(45, 45, 1) # not work too
mhangaard commented 5 years ago

I am also having the issue with click. With Windows 10 and Anaconda environment in cmd, Python 3.7.3 shell:

>>>import pyautogui
>>>pyautogui.click() ; print('ok')
# Click happens, then nothing (stalling).
# If i press Enter on keyboard, 'ok' gets printed.
mhangaard commented 5 years ago

It may be related to Insert mode and Quick edit mode: https://serverfault.com/a/205898 If those are switched off, it works.