FANDOM


We will learn about dialog boxes.

Try this code:

display dialog "Type in the box." default answer ""

There will be a box down the bottom of the dialog to type in.

The default answer "" makes a box to type in. Whatever is in the quotes is what is default said in the box. I'll show you what I mean.

display dialog "Type in the box." default answer "blahblah"

See what happens? Now try this:

display dialog "" default answer "Something."

display dialog text returned of the result

text returned is very similar to button returned, except it's about text and not buttons. You can set variables for them too...

display dialog "" default answer "..."

set a to text returned of the result

display dialog a

...and also for buttons...

display dialog "" buttons ("Awe", "Som", "E!") default button 2

set a to button returned of the result

display dialog a

It's fun to play with. Here's some extra:

display dialog "" buttons ("Yeah", "Nope")default button 1 cancel button 2

display dialog "OK..."

So as you can see here... cancel button 2 makes the second button act like a Cancel button. If you press "Yeah", you'll continue to the next dialog.

END OF LESSON 2-2. In PART 2-3, we will put it all together. For now, bye!

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.