Jump to content

Check for updates


 Share

Recommended Posts

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
Link to comment
Share on other sites

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

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...