Jump to content
Sign in to follow this  
Mattraks

Delete

Recommended Posts

Mattraks

Delete

Edited by Mattraks

Share this post


Link to post
Share on other sites
weaponx

Open the help file...

FileOpen

FileRead

FileReadLine

#include <File.au3>

_FileReadToArray ( $sFilePath, $aArray )

Share this post


Link to post
Share on other sites
Swift

Yes it is...

$File = FileOpen("file here.txt", 0)
$Line1 = FileReadLine($File, 1)
Msgbox(0, "Line 1", "Line 1 Says: "& $Line1)

Share this post


Link to post
Share on other sites
Swift

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

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  

×