Hi.I'm new in using autoit and i want to make an auto updater for my program.
I am using a script found on this forum.
This is it:
$currentver=1.4
inetget("http://www.vipersoft.co.cc/test/version.ini",@tempdir&"\techver.ini",1)
$onlinever=IniRead(@tempdir&"\techver.ini","Version","Version","unknown")
$15changes=IniRead(@tempdir&"\techver.ini","Update","1.5","unknown")
$16changes=IniRead(@tempdir&"\techver.ini","Update","1.6","unknown")
if $onlinever>$currentver then
$dlsize=inetgetsize("http://www.vipersoft.co.cc/test/program.exe")
$getnew=msgbox(4,"Update Available","Version "&$onlinever&" is available online, you currently have version "&$currentver&". Would you like to download the latest version now?"&@crlf&"(the download is "&round(($dlsize/1000000),2)&"MB)"&@CRLF&@CRLF&$16changes&@CRLF&@CRLF&$15changes)
if $getnew=6 Then
$wheretosave=FileSelectFolder("Please choose a folder to save the installer","",1)
$status=GUICreate("Download Progress",250,60)
$progress=GUICtrlCreateProgress(5,5,240,20)
$howfar=GUICtrlCreateLabel("",5,35,50,20,$ss_right)
$howbig=GUICtrlCreateLabel("",55,35,70,20,$SS_LEFT)
$howfast=GUICtrlCreateLabel("",155,35,90,20,$SS_left)
GUISetState(@sw_show,$status)
InetGet("http://www.vipersoft.co.cc/program.exe",$wheretosave&"\program.exe",1,1)
GUICtrlSetData($howbig,"MB/"&round(($dlsize/1000000),2)&"MB")
$toshow=TimerInit()
local $sofar
Do
if TimerDiff($toshow)>200 Then ;refresh every .2 seconds
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE then Exit
$lastlook=$sofar
$sofar=@InetGetBytesRead
$speed=($sofar-$lastlook)*5
GUICtrlSetData($progress,($sofar/$dlsize)*99)
GUICtrlSetData($howfar,round(($sofar/1000000),2))
$toshow=TimerInit()
EndIf
until $dlsize=$sofar
GUIDelete($status)
msgbox(0,"Done","Finished downloading the new version. This installer will now exit, please run """&$wheretosave&"\program.exe"" to unpack the new installation. You may also burn it to a CD or transfer it to a USB flash drive for future installation.")
Exit
EndIf
EndIf
This is the script but is an error at line 25.
Can you help me to fix it?Or can you give me another working script?