Jump to content

Check Version Help


Recommended Posts

I need this to work for my updater otherwise it will start updating randomlly...

i tryed to debug it myself but nothing.....

Local $Website = "http://gamemania.spruz.com/user/146787/files/update.exe"
    Local $size = InetGetSize("http://gamemania.spruz.com/user/146787/files/update.exe")
    Local $mysize = InetGetSize(@scriptdir & "\update.exe")
        GuiCtrlSetData(-5, 30)
    ;this "should" check version
    if $size < $mysize Then TrayTip("Notice!", "Somethings wrong with your updater!", 5, 3)
    elseif $size = $mysize then TrayTip("Notice!", "Got the lates version!", 5, 3)
    else
        if $size >  $mysize then
    TrayTip("Notice!", "Do not close when downloading!", 5, 3)
        GuiCtrlSetData(-5, 40)
    ProcessClose("update.exe")
    FileDelete(@Scriptdir & "\update.exe")
        GuiCtrlSetData(-5, 50)
    INetGet($Website,@scriptdir & "\update.exe", 1, 0)
        GuiCtrlSetData(-5, 60)
    Sleep(3000)
        GuiCtrlSetData(-5, 70)
    else
Link to comment
Share on other sites

Since your file is on the local computer

Replace this:

Local $mysize = InetGetSize(@scriptdir & "\update.exe")

With Function FileGetSize :

$mysize = FileGetSize(@scriptdir & "\update.exe")

If you've used the Compile button ftom Scite then you can add a version to your application, let's say 1.0.0.0

You can return that if you use: FileGetVersion()

You can find the above in the helpfile :D

Edited by AoRaToS

s!mpL3 LAN Messenger

Current version 2.9.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

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