Skip to content

Creating Simple Message Box Alerts

Alert

alert.py
import pyautogui
 
pyautogui.alert("Automation completed", title="Done")
alert.py
import pyautogui
 
pyautogui.alert("Automation completed", title="Done")

Confirm

confirm.py
import pyautogui
 
ans = pyautogui.confirm("Proceed?", buttons=["Yes", "No"])
print(ans)
confirm.py
import pyautogui
 
ans = pyautogui.confirm("Proceed?", buttons=["Yes", "No"])
print(ans)

If this helped you, consider buying me a coffee ☕

Buy me a coffee

Was this page helpful?

Let us know how we did