MessageRequester()

Syntax

Result = MessageRequester(Title$, Text$ [, Flags])
Description
Opens a blocking requester to display some information. The program execution is totally stopped until the user close the requester.

Parameters

Title$ The title of the requester window.
Text$ The text displayed in the requester window.
Flags (optional) It can be one of the following value:
  #PB_MessageRequester_Ok          : to have the 'ok' only button (default)
  #PB_MessageRequester_YesNo       : to have 'yes' or 'no' buttons
  #PB_MessageRequester_YesNoCancel : to have 'yes', 'no' and 'cancel' buttons
Combined with one of the following value:
  #PB_MessageRequester_Info   : displays an info icon
  #PB_MessageRequester_Warning: displays a warning icon
  #PB_MessageRequester_Error  : displays an error icon

Return value

It can be one of the following constants:
  #PB_MessageRequester_Yes    : the 'yes' button was pressed
  #PB_MessageRequester_No     : the 'no' button was pressed
  #PB_MessageRequester_Cancel : the 'Cancel' button was pressed

Example: Simple MessageRequester (usually for information purposes only)

  MessageRequester("Information", "Just a short information text.", #PB_MessageRequester_Ok | #PB_MessageRequester_Info)

Example: MessageRequester with Yes / No buttons (usually to question)

  Result = MessageRequester("Title", "Please make your input:", #PB_MessageRequester_YesNo)
  a$ = "Result of the requester was: "
  If Result = #PB_MessageRequester_Yes    ; pressed Yes button
    a$ + "Yes"
  Else                                    ; pressed No button
    a$ + "No"
  EndIf
  MessageRequester("Information", a$, #PB_MessageRequester_Ok)

Example: MessageRequester with Yes / No / Cancel buttons (usually to question)

  Result = MessageRequester("Title", "Please make your input:", #PB_MessageRequester_YesNoCancel) 
  a$ = "Result of the previously requester was: "
  If Result = #PB_MessageRequester_Yes       ; pressed Yes button
    a$ + "Yes"
  ElseIf Result = #PB_MessageRequester_No    ; pressed No button
    a$ + "No"
  Else                                       ; pressed Cancel button or Esc
    a$ + "Cancel"
  EndIf
  MessageRequester("Information", a$, #PB_MessageRequester_Ok)

Supported OS

All

<- InputRequester() - Requester Index - NextSelectedFilename() ->