Name

choose from list

Synopsis

listbox selection dialog

listbox selection dialog

Puts up a scrolling list of strings or numbers for the user to choose from. Returns a list of chosen strings or numbers, or false (not an error!) if the user cancels. There are two buttons, and you can set their titles; you can add a prompt and a window title. You can specify whether to permit multiple selections and/or an empty selection.

Example

set p to choose from list {"Mannie", "Moe", "Jack"} with prompt "Pick a Pep Boy:"

Get AppleScript: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.