here is the code
(The comments are only their as this is revision for a computing science class and the teacher likes us to make comments)
Code: Select all
Global Var_Names, Array_Names, Loop_Count, TKeys, tRandomPick
On Mouseup
setup_variabels
Get_Names
Display_Name
end Mouseup
On setup_variabels
Put 0 into loop_count //interger
Put Clear Into Array_Names //String Array
end setup_variabels
On Get_names
repeat with loop = 1 to 10 //Looping the upcoming commands 10 times
Ask "What is the names you want to enter (Enter one at a time)"
Put it into Array_Names[loop] //Putting the 10 names into an array
end repeat
end Get_names
On Display_Name
Put any line of the keys of Array_names into tRandomPick //Picking random name
Put tRandomPick into field "Output" //Outputing the random name
end Display_Name