Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.


B5016 - How do I get the external FTP functions to work?

by - Joseph Ganci

Does anyone know how to use this? I've been trying to get this to work in my AW file and it is being stubborn for me. Here is my code from what I can tell i'm supposed to be doing. They really didn't give a good explanation of how to use it, so I'm just guessing with this here. And this is only trying to connect, much less send anything.

(of course this login/password will not work on this site)

ftpID := FtpOpen( )
status := FtpConnect( ftpID, "", "21", "userid", "password" )
status := FtpGetWorkingDir( ftpID )
status := FtpDisconnect( ftpID )
status := FtpClose( ftpID )

I recently completed a project where I needed to do this and found it's best to separate the function calls and use the FtpStatus function to determine when a previous FTP function call has completed before moving to the next one. FTP calls are asynchronous - you don't know exactly how long it's going to take to finish a function call. However, when you place them all in a row (or even in separate Calc icons with no checking in between), you will find that the functions will step over each other. For instance, the FtpGetWorkingDir function may (and probably will) try to get the working directory returned before the FtpConnect file has even finished making its connection.

You can then use the status to determine whether to continue with the FTP calls or not. For instance, if the network connection or the FTP server is down, you can determine to save the data to a local file and upload it at a later time.

There are 0 reviews
Add your review