Alright, well I'm making small programs for assignments for school, I have the basics down and could probably ace the marking but I feel like going above and beyond.
What I'm trying to get work is for the program to ask if you want to restart the program and if the user answers yes to say something like "Press Enter to Continue", and when the enter key is pressed for the program to restart itself.
Any help would be appreciated.
Here's the scripting I've got done so far.
Quote:
var name1, name2, name3, name4, name5 : string
var reply : string
var chars : array char of boolean
setscreen ("graphics:max;max")
loop
put "Enter five full names, please seperate each by a line. (Press Enter)"
get name1 : *
get name2 : *
get name3 : *
get name4 : *
get name5 : *
put skip
put "Now watch how these names are rearranged to be backwards!"
put name5
put name4
put name3
put name2
put name1
put "ITS MAGIC!"
put "Do you want to flip around more names? Y/N "
get reply
exit when reply = "n" or reply = "N"
if reply = "y" or reply = "Y" then
put "Ok then! Press then down arrow when you want to start over!"
delay (100)
loop
Input.KeyDown (chars)
if chars (KEY_DOWN_ARROW) then
locate (19, 1)
put "And here we go again!"
delay (100)
cls
end if
end loop
end if
end loop