Let’s have a simple Dialog

When I first started I wanted a dialog box that popped up saying “Hello World!”. Now I want a simple dialog box to pop up but ask for input. This is actually quite simple. All you have to do is add “Default Answer “”‘ to the display dialog statement.

display dialog “How are you?” Default Answer “Ok…” default answer “”

Here is a simple “What day is it?” dialog example.

The returned result for this example is: {text returned:”Monday”, button returned:”OK”}. Alternatively, you can set the text entered into the dialog box directly to a variable by using the statement below:

set textReturned to the text returned of (display dialog "what
day is it?" default answer "Monday")

0 Responses to “Let’s have a simple Dialog”



  1. No Comments Yet

Leave a Reply




 

May 2008
S M T W T F S
     
 123
45678910
11121314151617
18192021222324
25262728293031

Top Posts

  • None

Top Clicks

  • None

Recent Comments

Archives