Sign in to follow this  
Followers 0
tom13

Check for updates

3 posts in this topic

#1 ·  Posted (edited)

I made this little script to check for upgrades, if the text file has a 1 in it it should say that you need to update:

$updatefile = InetGet("http://web-page.com/update-check.ini", "update-check.ini")

If StringInStr("update-check.ini", "23") Then
MsgBox(4096, "Update", "Update is necessary!", 10)
Else
MsgBox(4096, "Update", "Update is not necessary!", 10)  
EndIf

But it is always saying "Update is not necessary", even though the text file has 23 in it.

Anyone can help?

Edited by tom13

Share this post


Link to post
Share on other sites



I thought it worked, but it doesn't... anyone knows why?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

here is one that works, the file has a number 2 in it only.

InetGet("http://home.insightbb.com/~theojdude/itoady/check_update.txt", "check_update.txt",1)
$file = FileOpen(@ScriptDir & "\" & "check_update.txt", 0)
Local $line = FileReadLine($file)   
FileClose($file)
FileDelete (@ScriptDir & "\"& "check_update.txt")
If $line = 2 Then 
    MsgBox(4096, "Update", "Update is necessary!", 10)
Else
    MsgBox(4096, "Update", "Update is not necessary!", 10)    
EndIf
Edited by Toady

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

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