我想使用 pyautogui.alert 函数,并且希望在用户单击“确定”按钮后执行特殊操作。我如何与此按钮交互?
pyautogui.alert (text = '', title = '', button = 'OK')
最佳答案
或者你可以这样做:
# display the alert
alert = pyautogui.alert(text = '', title = '', button = 'OK')
# check to see if "OK" was pressed
if alert.upper() == "OK":
# do something
关于python - pyautogui Python 3.6 与 ok 按钮交互,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59255225/