SerpentsCode Posted December 15, 2009 Share Posted December 15, 2009 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: expandcollapse popup$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? Link to comment Share on other sites More sharing options...
enaiman Posted December 15, 2009 Share Posted December 15, 2009 ... and what would be the error you're getting there?? SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
SerpentsCode Posted December 15, 2009 Author Share Posted December 15, 2009 (edited) This is a screenshot with the error.Can improve my script?screenshot! Edited December 15, 2009 by VipEr Link to comment Share on other sites More sharing options...
bogQ Posted December 15, 2009 Share Posted December 15, 2009 #include <GUIConstantsEx.au3> #include <StaticConstants.au3> TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
SerpentsCode Posted December 16, 2009 Author Share Posted December 16, 2009 thanks bogq now is working perfect. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now