Because I feel this is the most important piece of the programming puzzle, we will actually be starting with how to communicate with the user. This is accomplished by typing the following code into the blank script window you should have open:
--This is a comment. You don't have to type it in.
(*
This is also a comment, but it can be alot longer than the other kind, in fact, I can keep typing straight across a line break and it will not count as real code. You don't have to type this in either.
*)
--The next line will be the code you actually type in.
display dialog "Your witty statement goes here."
--You can put the non-Hello World phrase you came up with in the quotes.

Okay, have you typed in the line that starts with display dialog? Good, this is the business line. I will use the other types of lines to tell you within the code what it's doing.
display dialog is the command in this script. A command is almost always followed by something to tell the command what it needs to do. In this case, it's telling the computer to display your message in a dialog window.
If you pull the Controls menu down to Run menu item, you will cause the editor to run your code:

This is the basic way that you will be talking to the user. Make sure the messages you use make as much sense as possible. Not just to you, but to the people sitting around you too. If no one is sitting around you, ask someone to look at it when you get a chance, it will give you a chance to use that iChat finally.
Now, that's all well and good, but it's missing part of the communication equation. that would be the listening part. You can look it up, I'll wait. Okay, now that we're back, we'll cover that part of the equation. The command is the same, but we add a piece to it. We're also going to start writing a real program (much like the ones I used to write when I was learning programming in BASIC). Here's what the program will do. It will get the users first name and their birth year. It will then ask them what year it is now. Using those two numbers and the name, it will tell them how old they are. It may sound silly, but it gives us something to focus on.
Let's start by altering the code you've already entered into the Script Editor. The brialliant message you came up with is going to be replaced.
--Gets the user's first name.
display dialog "Enter your first name:" default answer ""

I've left the field blank because the user could have any name. If 90% of the people in the world were named Frank, I'd have typed, default answer "Frank". That would have caused the text Frank to be put in the text entry field at the beginning. I would have done this so 90% of the people in the world could press the OK button and be done with it.

Well that's nice, but we don't know what they typed if we're not looking over their shoulders when they're typing it. So how do we get that information out of the program? Lets go under the Controls menu to the Open Event Log menu item. You will see a new window open up with two check boxes at the top. We want to check the Show Event Results check box. If you run your program now (you will probably need to click in the script window to bring it to the front), you will see neat things happen in this window:

The piece of information after the little arrow (-->) is the part we are looking for. This is what is called the result. There is a result returned from almost every command we are going to type into our editor. To get to this, we will have to enter more code into our editor:
--Gets the user's first name.
display dialog "Enter your first name:" default answer ""
--Grab the text returned from the result of the previous command
set firstName to text returned of the result
--Display the first name we just grabbed.
display dialog firstName
Next Lesson - My Cup Runneth Over With Information - Variables