msgbox
msgbox(title, message, message_max_length=1000, disappear_time=-1, message_location='center')
Method description
Displays a message box.
Parameters
title <str> title
message<str>: The message.
message_max_length<int>: The maximum length of the message text.
disappear_time<int>: The time in seconds before the message box automatically closes. The default value is -1, which means the box does not automatically close.
message_location<str>: The position of the message box.
Options:
center: Centered (default).
top: Top.
bottom: Bottom.
bottom_right: Bottom right.
Return value
Returns the selection result, "ok".<str>
Example call: rpa.system.dialog.msgbox
# Notes: None
# The following code example displays a message box with an OK button.
rpa.system.dialog.msgbox('Message Box', 'This is a message box from RPA.')choose
choose(title, message)
Method description
Displays a choice box.
Parameters
title<str>: The title.
message<str>: The message.
Return value
Returns the selection result.<bool>
Example call: rpa.system.dialog.choose
# Notes: None
# The following code example displays a choice box with Yes and No buttons. It returns True or False based on the selection.
rpa.system.dialog.choose('Choice Box', 'This is a choice box from RPA.')choose_with_multi_style
choose_with_multi_style(title, message, message_level='info', choose_type='yes_no', choose_location='center')
Method description
Displays a choice box with multiple styles.
Parameters
title <str> Title
message<str>: The message.
message_level<str>: The message level.
Options:
info: Information (default).
warn: Warning.
error: Error.
choose_type<str>: The button style.
Options:
ok: Displays only the OK button (default).
yes_no: Displays the Yes and No buttons.
abort_retry_ignore: Displays the Abort, Retry, and Ignore buttons.
yes_no_cancel: Displays the Yes, No, and Cancel buttons.
retry_cancel: Displays the Retry and Cancel buttons.
ok_cancel: Displays the OK and Cancel buttons.
choose_location<str>: The position of the dialog box.
Options:
center: Centered (default).
top: Top.
bottom: Bottom.
bottom_right: Bottom right.
Return value
Returns a string that represents the selection result.<str>
Example call: rpa.system.dialog.choose_with_multi_style
# Notes: None
# The following code example displays a choice box with a specific style based on the settings. It returns a string that corresponds to the selection.
rpa.system.dialog.choose_with_multi_style('Choice Box', 'This is a choice box from RPA', message_level='warn', choose_type='yes_no_cancel')inputbox
inputbox(title, content, watermark_text='Please enter')
Method description
Displays an input box.
Parameters
title <str> title
content<str>: The message.
watermark_text<str>: The watermark text.
Return value
Enter content <str>
Example call: rpa.system.dialog.inputbox
# Notes: None
# The following code example displays an input box with OK and Cancel buttons. After you click OK, it returns the entered string.
rpa.system.dialog.inputbox('Input Box', 'This is an input box from RPA.')inputbox
inputbox(title, content, watermark_text='Please enter')
Method description
Displays an input box.
Metric Description
title<str>: The title.
content <str> Information
watermark_text<str>: The watermark text.
Return value
Returns the entered content.<str>
Example call: rpa.system.dialog.inputbox
# Notes: None
# The following code example displays an input box with watermark text and an OK button. After you click OK, it returns the entered string.
rpa.system.dialog.inputbox('Input Box', 'This is an input box from RPA.')option
option(title, msg, default, data)
Method description
Displays a drop-down list box.
Parameters
title<str>: The title.
msg<str>: The message.
default<str>: The default value.
data<list>: The list of options.
Return value
Returns the selection result.<str>
Example call: rpa.system.dialog.option
# Notes: None
# The following code example displays a drop-down list box with OK and Cancel buttons. After you click OK, it returns the selected string.
option_list = ['Alibaba Cloud', 'RPA', 'Leading Enterprise Intelligence']
rpa.system.dialog.option('Drop-down List', 'This is a drop-down list from RPA', 'Default Value', option_list)