w0uter Posted July 1, 2005 Posted July 1, 2005 (edited) since i dislike AutoUpdateIt.au3(due to that it does not download zip files)i made this.NEW CODE:(also attached an .exe so that it can be used to update NON-beta versions)expandcollapse popupIf Ping("www.autoitscript.com") = 0 Then MsgBox(0, 'ERROR', 'Could not contact:' & @CRLF & '"http://www.autoitscript.com"') Exit EndIf $v_HTTP = ObjCreate ("winhttp.winhttprequest.5.1") $v_HTTP.open ("GET", 'http://www.autoitscript.com/autoit3/files/beta/autoit/') $v_HTTP.send () $v_HTTP = $v_HTTP.Responsetext $v_HTTP = StringRegExp($v_HTTP, '"AutoIt3\.1\.1\.(.*?)\.zip"', 3) If @extended = 0 Then MsgBox(0, 'ERROR', 'RegExp failure.') Exit EndIf $v_HTTP = $v_HTTP[UBound($v_HTTP) - 1] $v_DL = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") If $v_DL = "" Then $v_DL = MsgBox(3, 'ERROR', 'Could not find the standard AutoItDir.' & @CRLF & @CRLF & 'Do you want to specify it yourself ?' & @CRLF & @CRLF & 'YES = Select folder.' & @CRLF & 'NO = Just download.' & @CRLF & 'CANCLE = Exit script.') If $v_DL = 6 Then $v_DL = FileSelectFolder("Choose the standard AutoItDir.", "") If $v_DL = 2 Then Exit If $v_DL = 7 Then $v_DL = '' EndIf If $v_DL <> "" Then If FileExists($v_DL & '\beta\AutoIt3.exe') Then If StringRight(FileGetVersion($v_DL & '\beta\AutoIt3.exe'), StringLen($v_HTTP)) = $v_HTTP Then MsgBox(0, 'ERROR', 'Matched the version number on:' & @CRLF & $v_DL & '\beta\AutoIt3.exe') Exit EndIf EndIf If FileExists($v_DL & '\AutoIt3.exe') Then If StringRight(FileGetVersion($v_DL & '\AutoIt3.exe'), StringLen($v_HTTP)) = $v_HTTP Then MsgBox(0, 'ERROR', 'Matched the version number on:' & @CRLF & $v_DL & '\AutoIt3.exe') Exit EndIf EndIf EndIf InetGet("http://www.autoitscript.com/autoit3/files/beta/autoit/AutoIt3.1.1." & $v_HTTP & '.zip', @TempDir & '\AutoIt3.1.1.' & $v_HTTP & '.zip', 1, 1) $v_DL = InetGetSize('http://www.autoitscript.com/autoit3/files/beta/autoit/AutoIt3.1.1.' & $v_HTTP & '.zip') TrayTip('Completion:', '0 %', 10) While @InetGetActive TrayTip('Completion:', Int(@InetGetBytesRead / $v_DL * 100) & ' %', 10, 16) Sleep(250) WEnd TrayTip('Completion:', '100 %', 10) Sleep(1000) RunWait(@ComSpec & ' /c start ' & @TempDir & '\AutoIt3.1.1.' & $v_HTTP & '.zip', '', @SW_HIDE)it only use's 2 variables$v_HTTP for the core functions$i_HTTP for the percentage calculation.Update.rar Edited July 9, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
MSLx Fanboy Posted July 1, 2005 Posted July 1, 2005 Well, I had to reinstall the public version, then overwrite again with .54. Ran your script, oh so beautiful! Nicely done! Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
kjactive Posted July 2, 2005 Posted July 2, 2005 Well I use .zip updates too and wrote a new Update applicatipn that can use these files as well as to make an library of previous updates to reinstall - works pretty well and free to download...download at site:http://www.sitecenter.dk/latenight/nss-fol...e/Au3Update.exeThe application come with source code, installer/uninstaller and a topics...kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
w0uter Posted July 9, 2005 Author Posted July 9, 2005 New Code. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Developers Jos Posted July 10, 2005 Developers Posted July 10, 2005 since i dislike AutoUpdateIt.au3(due to that it does not download zip files)<{POST_SNAPBACK}>Not sure i understand the purpose... your script downloads the latest BETA ZIP file and then unzips it, but don't understand what this gives you on top of the standard AutoUpdateIt.au3 ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
w0uter Posted July 10, 2005 Author Posted July 10, 2005 i hate exe's i want to be able to place it where i want and how i want. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
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