Livecode Wiki

ask gives the programmer the means to get information from the user. When the ask statement is executed, it creates a ready-to-use window with a field and buttons.

Built-in Message handler[]

For example:

ask "What is your name?"

Ask example

The user clicks on the Cancel button or enters text into the field, then clicks on the OK button. Any text entered by the user is stored in the it variable, which can then be incorporated into the operation of the program.

It is also possible to add an icon to the ask window. Livecode has the following predefined icons:

  • information
  • question
  • error
  • warning


ask information "Come to Chrome"
ask question "Come to Chrome"
ask error "One the combination"
ask warning "One the combination"

If you use some HTML tag, the text is intepreted as HTMLText. Use this feature to customize text.


This is the general form of the syntax:

ask [iconType] prompt [with defaultResponse] [titled windowTitle] [as sheet]