ravaged1 Posted December 28, 2010 Share Posted December 28, 2010 I'm making a script to download and install a users database for Saleslogix. it's working just fine but want to add a error msgbox when it does not work. Because the DB's are user specific they are named with there domain names. ;sample script. $User = @Username InetGetInfo("http://downloadsite/SLX_" & $User & "_dat.sxd") If @error < 0 Then msgbox(0, "title" , "text") ;call a working func in the full version ; continue through the script. Can not seem to find the right @error level, the help file says "Failure - An empty string and @error is set to non-zero" Just wanted to keep it simple, check for that users file if not found msgbox the error and exit, or if it is download and install. Anyone have a suggestions or a better way of accomplishing this? I would be very great full. Thanks Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 29, 2010 Share Posted December 29, 2010 Why did you use InetGetInfo()? Did you mean to just download the file with InetGet()? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
ravaged1 Posted December 29, 2010 Author Share Posted December 29, 2010 Why did you use InetGetInfo()? Did you mean to just download the file with InetGet()?I just want to check if the file exists or if they are not connected to the internet.Because if they run the script and don't meet either of these requirements the script will hang. Link to comment Share on other sites More sharing options...
ravaged1 Posted December 29, 2010 Author Share Posted December 29, 2010 Any one know a better way to do this? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted December 29, 2010 Share Posted December 29, 2010 Well there are other ways I'm sure, how much better I'm not sure, but here's an example quoted from the Help file, for the Ping function. $var = Ping("www.AutoItScript.com",250) If $var Then; also possible: If @error = 0 Then ... Msgbox(0,"Status","Online, roundtrip was:" & $var) Else Msgbox(0,"Status","An error occured with number: " & @error) EndIf - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now