Jump to content

Delete


Recommended Posts

Look at the source, is uses FileOpen(to open the txt files) and FileReadLine() to read the line, lemme...make it a little more clear.

I gave info about the function to the side...hope it helps!

#include <GUIConstants.au3>
#include <Misc.au3>
$Ini = @ScriptDir & "\settings.ini"
$File = IniRead($Ini, "Updater", "File", "")
$Updatetxt = IniRead($Ini, "Updater", "Updatetxt", "")
InetGet($Updatetxt, @HomeDrive & "\temp\" & $File)
Global $FileHandle1 = FileOpen($File, 0);here, I am opening the file to be read!
Global $FileHandle2 = FileOpen(@HomeDrive & "\temp\" & $File, 0); I am opening the downloaded ver file
Global $ver = FileReadLine($FileHandle1, 1); This is telling me the version of the file 1
Global $ver1 = FileReadLine($FileHandle2, 1); This is telling me the version of the file2
_UpdateCheck()
#EndRegion Startup
Func _UpdateCheck();I am comparing to see which is bigger
    If _VersionCompare($ver, $ver1) = 0 Then; this is checking the FileReadLine($FileHandle2, 1) Thing to see which is bigger
        MsgBox(0, "Update", "There Is No Updates At This Time!"); Then displaying a messagebox
        Exit
    EndIf
    If _VersionCompare($ver, $ver1) = 1 Then; same thing here
        MsgBox(0, "Update", "You Are Using A Better Version Than Whats Available")
        Exit
    EndIf
    If _VersionCompare($ver, $ver1) = -1 Then; and here
        $Updatemsg = MsgBox(4, "Update", "Update Found! Download Now?")
        If $Updatemsg = 6 Then
            _Update()
        Else
            Exit
        EndIf
    EndIf
EndFunc  ;==>_UpdateCheck
Edited by Swift
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...