tom13 Posted April 28, 2007 Share Posted April 28, 2007 (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 April 28, 2007 by tom13 Link to comment Share on other sites More sharing options...
tom13 Posted April 28, 2007 Author Share Posted April 28, 2007 I thought it worked, but it doesn't... anyone knows why? Link to comment Share on other sites More sharing options...
Toady Posted April 28, 2007 Share Posted April 28, 2007 (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 April 28, 2007 by Toady www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding 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