How to register or recognize prompt

Is there a way for AppleScript to know when a process in shell has finished?

if you use do shell script to download a file via ftp, is there a way to register
when the prompt (Macintosh HD:~ username$) reappears? or to register a
ftp complete! message?

-soda

what are you trying to do?
do something when the transfer is complete?
if so you can just do shell script and the script will wait for it to be done

I’m trying to set comments of an ftp downloaded file. It seems that if the file is small (4k)
the comments come in fine, but if the file is large (1MB) the comments do not come through.

I imagine that the comments script could be kicking in when the item appears on the Finder window
(just as folder actions kick in when the file appears in the folder, not when it’s done downloading into the folder)
and the comments are getting lost.

the ftp is a shell command:

on download(the_image)
	set ftp_file to the_image
	do shell script "ftp -o ~/Desktop/EH/" & ftp_file & " ftp://" & ftp_username & ":" & ftp_password & "@" & ftp_server & ftp_path & ftp_file
end download