Debian Codegraph @

docs/msgbox.rst

raw
1 .. default-role:: code
2
3 =====================
4 Message Box Functions
5 =====================
6
7 PyAutoGUI makes use of the message box functions in PyMsgBox to provide a cross-platform, pure Python way to display JavaScript-style message boxes. There are four message box functions provided:
8
9 The alert() Function
10 ====================
11
12 >>> alert(text='', title='', button='OK')
13
14 Displays a simple message box with text and a single OK button. Returns the text of the button clicked on.
15
16 The confirm() Function
17 ======================
18
19 >>> confirm(text='', title='', buttons=['OK', 'Cancel'])
20
21 Displays a message box with OK and Cancel buttons. Number and text of buttons can be customized. Returns the text of the button clicked on.
22
23 The prompt() Function
24 =====================
25
26 >>> prompt(text='', title='' , default='')
27
28 Displays a message box with text input, and OK & Cancel buttons. Returns the text entered, or None if Cancel was clicked.
29
30 The password() Function
31 =======================
32
33 >>> password(text='', title='', default='', mask='*')
34
35 Displays a message box with text input, and OK & Cancel buttons. Typed characters appear as ``*``. Returns the text entered, or None if Cancel was clicked.
36