我用Python2.7,Win7 32位。在
import pyautogui
pyautogui.confirm(text=u'XXXX', title=r'XX', buttons=['OK', 'Cancel'])
pyautogui.click()
错误:
^{pr2}$我的Windows语言是中文。意思是invalid windows handle
我尝试获取鼠标位置并将其作为参数发送到pyautogui.click()
但是我也犯了同样的错误
pyautogui.confirm(text=u'XXXX', title=r'XX', buttons=['OK', 'Cancel'])
currentMouseX, currentMouseY = pyautogui.position()
pyautogui.click(currentMouseX, currentMouseY)
另一次失败的尝试:
pyautogui.confirm(text=u'XXXX', title=r'XX', buttons=['OK', 'Cancel'])
currentMouseX, currentMouseY = pyautogui.position()
pyautogui.moveTo(currentMouseX, currentMouseY)
pyautogui.click()
提前谢谢。如有任何建议,我们将不胜感激。在
我得到这个错误,发现它仍然执行点击-尝试这个:
或者如果你不想让它打印任何东西:
^{pr2}$相关问题 更多 >
编程相关推荐