Jump to content

Recommended Posts

Posted

$CurrentVersion = IniRead("Setting.ini", "Version", "Current", "")

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "http://h1.ripway.com/ROToolbox/CurrentVersion.txt")
$oHTTP.Send()
$NewestVersion = $oHTTP.Responsetext

If $CurrentVersion = $NewestVersion Then
    MsgBox(0, "Info", "Your have the latest version.")
Else
    If $CurrentVersion < $NewestVersion Then
        $Update = MsgBox(4, "Info", "Update Available. Update Now?")
        If $Update = 6 Then Update()
    EndIf
EndIf

Func Update()
    IniWrite("Setting.ini", "Version", "Current", $NewestVersion)
EndFunc

Here the ini

[Version]
Current=1

Heres my problem, It always says It needs to update, even if its the same "Version" as the newest.

The ini says 1, then NewestVersion.txt says 1, I checked in a msgbox, they are both 1, yet, it still says its less.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted (edited)

Works now, Thanks ^^

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted

Hi,

$CurrentVersion = IniRead("Setting.ini", "Version", "Current", "")

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open ("GET", "http://h1.ripway.com/ROToolbox/CurrentVersion.txt")
$oHTTP.Send ()
$NewestVersion = $oHTTP.Responsetext

Select
    Case Int($CurrentVersion) = Int($NewestVersion)
        MsgBox(0, "Info", "Your have the latest version.")
    Case Int($CurrentVersion) < Int($NewestVersion)
        If MsgBox(4, "Info", "Update Available. Update Now?") = 6 Then Update()
EndSelect

Func Update()
    IniWrite("Setting.ini", "Version", "Current", $NewestVersion)
EndFunc  ;==>Update

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...