Entering text in textarea and moving to next textarea

Hi i have 6 options like
firstname:
lastname:
age:
number:
etc…

i want to enter text ,and move to next option.

please give me some code

[u]and another thing in this is i want to give user a option like dynamically he can provide data , like if i need to enter 4 students details

can u please explain with code…so that i can understand[/u]

You can just use tabs to move from field to field:

Typetext "John", tab
Typetext "Smith", tab
// etc.

To prompt the user for information, you can use the “ask” command:

Ask "What is the first name?"
Typetext it, tab
Ask "Last name?"
Typetext it, tab

Hope that helps.

How eggplant will accept the data entered by the user

The value input by the user in response to the “ask” prompt goes into the built-in variable “it”. If you want to store that value for future use, you can assign it to another variable:

Ask "What is the first name?"
put it into firstName
Typetext firstName, tab
// do some other stuff
If not imageFound(text: firstName)
      LogError "data not processed correctly"
End if

Thanku so much

when we using ask…
the input given as u said is going into default value it

my quetion is if i press cancel and i want that action

like
i asked to save if i enter name i can use it.

when i want to save later i want to press cancel from ask popup

that should also cancel the save pop-up cancel

The simplest way to check if Cancel was pressed is just to test whether IT is empty:

ask "What is the first name?"
if it is empty then exit script -- or whatever action you need in this case

On the other hand, if an empty first name is a valid response, then this won’t be what you want. In that case, to distinguish between a user clicking Cancel or simply clicking OK without entering anything, you’ll have to check the result:

ask "What is the first name?"
if the result is "Cancel" then exit script -- or whatever your Cancel action is

The trick to using the result function is that you have to be sure to call it on the very next line of your script, since it reports on the status of the last command that was executed.