Sign in to follow this  
Followers 0
ravaged1

problem with InetGetInfo error level

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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

:x


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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Any one know a better way to do this?

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0