This script uses WHILE to check if the result of OPENHOST was OK. If not tries to reconnect. Note that OPENHOST will be called indefinitely while the connection does not succeed.
# The While sentence here means "Run OPENHOST while its
# result is different than OK". If OPENHOST fails it
# will be executed again and again.
# Note that in the first loop the value of
# the variable $result_open_host is an empty text string so
# it is different than OK
# Connect to ftp.myhost.com and save the result in the variable
# If this point is reached means that ScriptFTP is
# already connected
# Upload the files
# Close the connection