다른 명령
잔글 개발노트 양식 일괄 적용 |
|||
| 1번째 줄: | 1번째 줄: | ||
{{개발노트 | |||
|요약=Displays a confirmation message box and returns the user’s response as 'OK' or 'Cancel'. | |||
|핵심= | |||
|분야=Python | |||
|작성일=2024-10-22 | |||
}} | |||
== PyautoGui 메시지창 띄우기 == | == PyautoGui 메시지창 띄우기 == | ||
{{틀:요약 | {{틀:요약 | ||
2026년 11월 12일 (목) 12:45 기준 최신판
DEVCAFE NOTE
PythonDisplays a confirmation message box and returns the user’s response as 'OK' or 'Cancel'.
KEY POINTS · 핵심 정리
PyautoGui 메시지창 띄우기
list_alt내용을 입력하세요
Alert Message Box
# Displays a simple alert message with an OK button.
<source lang=python>
import pyautogui
pyautogui.alert('This is an alert message!')
Confirmation Message Box (Yes/No)
- Displays a confirmation message box and returns the user’s response as 'OK' or 'Cancel'.
import pyautogui
response = pyautogui.confirm('Do you want to proceed?')
print(f'User selected: {response}')
Prompt for Text Input
- Opens a dialog box for the user to input text.
import pyautogui
name = pyautogui.prompt('What is your name?')
print(f'Hello, {name}!')
Password Input (Obscured Text)
- Opens a dialog box to enter a password, where the input is hidden.
import pyautogui
password = pyautogui.password('Enter your password:')
print('Password entered (hidden for security).')