Jump to content

problem with InetGetInfo error level


ravaged1
 Share

Recommended Posts

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

Why did you use InetGetInfo()? Did you mean to just download the file with InetGet()?

:x

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...