$ftp->start_job; while ($ftp->status != $the_code_for_complete) { update_gui(); }