hello guys
I’m connecting to a FTP with maxscript and it works fine. I now want to secure the script if the username is wrong instead of maxscript throwing an error. How can I do?
Here’s my script
fn ConnectToFTP Login Password =
(
local webClient = dotnetObject “System.Net.WebClient”
local FTP_URL = @“ftp://test/”webClient.Credentials = dotnetObject “System.Net.NetworkCredential” Login Password
theUri=dotnetObject “System.Uri” (FTP_URL)
)
If I put a wrong login or password maxscript throws me an error; i’d like to try and catch it myself but I dont know how. I tried something like this:
if theUri == undefined then… but it doesnt work.
Help please!
thank you!!