on startMovie global theName set theName = "none" end
on mouseUp global theName put field "Name entry" into theName end
on userInfo set IdOfClient = the number of lines in field "FirstName" -- -- stores an integer ID for the test-taker, which is -- determined from the number of entries already made -- The number of lines is initialized to one in startMovie. -- set line IdOfClient of field "FirstName" to the text of cast "FirstName Entry" set line IdOfClient of field "LastName" to the text of cast "LastName Entry" set line IdOfClient of field "EmployeeID" to the text of cast "ID Entry" set the text of cast "FirstName Entry" to EMPTY set the text of cast "LastName Entry" to EMPTY set the text of cast "ID Entry" to EMPTY -- set line IdOfClient + 1 of field "FirstName" to "--" end
In this example, there are three fields that the user fills in named FirstName Entry, LastName Entry, and ID Entry. The values of these for all users are stored in the fields "FirstName", "LastName", and "EmployeeID".
The script works by finding out how many lines the field "FirstName" has. Since the last entry in the field is "--" (put in by the last line of the script), this is the number of the line where we will store the next entry.
After we have the entry line, we can take information from the input fields and put them into the appropriate lines of the storage fields. Then we put "--" into the last line of the "FirstName" field so that we know where to start the next time.
Return to Student Home Page
Last Modified: 6 April 1998
THIS PAGE MAINTAINED BY:
John
Barr, Ithaca College